disconnect method

void disconnect()

Close current websocket connection

Implementation

void disconnect() {
  _channel = null;
  _connecting = false;
  _ws?.close(status.goingAway);
  onDisconnect.add(null);
}