disconnect method
Closes the WebSocket connection
Implementation
Future<void> disconnect([int? code, String? reason]) async {
_log('Disconnecting WebSocket');
_heartbeatManager.stop();
_reconnectionManager.stopReconnection();
await _adapter.disconnect(code, reason);
}