function close() {
          setState('disconnecting');

          if (bufferDrainTimeout) {
            clearTimeout(bufferDrainTimeout);
            bufferDrainTimeout = null;
          }

          webSocket.close();
        }
// Immediately close the socket, only used by disconnectWhenSendBufferIsDrained
Immediately close the socket, only used by disconnectWhenSendBufferIsDrained
Immediately close the socket only used by disconnectWhenSendBufferIsDrained
function close() {
          setState('disconnecting');
          if (bufferDrainTimeout) {
            clearTimeout(bufferDrainTimeout);
            bufferDrainTimeout = null;
          }
          webSocket.close();
        }
function close ( ) { setState ( 'disconnecting' ) ; if ( bufferDrainTimeout ) { clearTimeout ( bufferDrainTimeout ) ; bufferDrainTimeout = null ; } webSocket . close ( ) ; }
Immediately close the socket, only used by disconnectWhenSendBufferIsDrained
Immediately close the socket only used by disconnectWhenSendBufferIsDrained