reconnectWebSocket method
- @Deprecated('Use closeStreamingConnection / openStreamingConnection instead.')
Closes the current web socket connection (if open), then connects again.
Implementation
@Deprecated('Use closeStreamingConnection / openStreamingConnection instead.')
Future<void> reconnectWebSocket() async {
if (_webSocket == null) return;
await _webSocket?.sink.close();
_webSocket = null;
_cancelConnectionTimer();
await openStreamingConnection();
}