code: private void sendCloseMessage() {
  
          this.lock(() -> {
  
              TcpChannelHub.this.writeMetaDataForKnownTID(0, outWire, null, 0);
  
              TcpChannelHub.this.outWire.writeDocument(false, w ->
                      w.writeEventName(EventId.onClientClosing).text(""));
  
          }, TryLock.LOCK);
  
          // wait up to 1 seconds to receive an close request acknowledgment from the server
          try {
              final boolean await = receivedClosedAcknowledgement.await(1, TimeUnit.SECONDS);
              if (!await)
                  if (Jvm.isDebugEnabled(getClass()))
                      Jvm.debug().on(getClass(), "SERVER IGNORED CLOSE REQUEST: shutting down the client anyway as the " +
                              "server did not respond to the close() request.");
          } catch (InterruptedException ignore) {
              Thread.currentThread().interrupt();
          }
      }
docs: used to signal to the server that the client is going to drop the connection, and waits up to
  one second for the server to acknowledge the receipt of this message