disconnect method
Disconnect the client from the server
Implementation
@override
Future<void> disconnect() async {
_stopPingTimer();
if (_transport == null) {
return;
}
await tryCatchIgnore(() async {
await _transport!.close();
});
_transport = null;
_sessionId = null;
for (final plugin in plugins) {
plugin.onDisconnected();
}
_updateConnectionStatus(ConnectionStatus.disconnected);
}