code: void channelCloses(final SynchronizeFXWebsocketChannel synchronizeFXTomcatChannel) {
          synchronized (channels) {
              if (isCurrentlyShutingDown) {
                  return;
              }
              // Maybe a bit inefficient but the alternative would be to pass cannelName and SynchronizeFxServer to the
              // channel just to be able to close itself.
              final Iterator<Entry<String, SynchronizeFXWebsocketChannel>> channelIterator =
                      channels.entrySet().iterator();
              while (channelIterator.hasNext()) {
                  if (channelIterator.next().getValue().equals(synchronizeFXTomcatChannel)) {
                      channelIterator.remove();
                  }
              }
  
              final Iterator<Entry<SynchronizeFxServer, SynchronizeFXWebsocketChannel>> serverIterator =
                      servers.entrySet().iterator();
              while (serverIterator.hasNext()) {
                  if (serverIterator.next().getValue().equals(synchronizeFXTomcatChannel)) {
                      serverIterator.remove();
                  }
              }
  
              final Iterator<Entry<Session, SynchronizeFXWebsocketChannel>> clientIterator =
                      clients.entrySet().iterator();
              while (clientIterator.hasNext()) {
                  if (clientIterator.next().getValue().equals(synchronizeFXTomcatChannel)) {
                      clientIterator.remove();
                  }
              }
          }
      }
docs: This is called when a channel is closing and should therefore no longer accept new connections.
  
  @param synchronizeFXTomcatChannel The channel that closes.