onDisconnected method

void onDisconnected()

Implementation

void onDisconnected() {
  debugPrint('Disconnected');
  _broadcastConnectionState();
  if (_messagesController != null && !_messagesController!.isClosed) {
    //_messagesController!.close();
  }
  _client = null;
  _clientId = null;
}