disconnect method

void disconnect()

Implementation

void disconnect() {
  _logger.fine('disconnect');
  skipReconnect = true;
  reconnecting = false;
  if ('opening' == readyState) {
    // `onclose` will not fire because
    // an open event never happened
    cleanup();
  }
  backoff!.reset();
  readyState = 'closed';
  engine.close();
}