From decd1cd125b650c4e791dba8881aeb02fc00db36 Mon Sep 17 00:00:00 2001 From: Vincent Velociter Date: Mon, 21 Oct 2024 15:57:03 +0200 Subject: [PATCH] Fix disposed socket scheduled reconnect average lab --- lib/src/network/socket.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/network/socket.dart b/lib/src/network/socket.dart index 08e05fd402..557a3eb953 100644 --- a/lib/src/network/socket.dart +++ b/lib/src/network/socket.dart @@ -407,9 +407,9 @@ class SocketClient { void _scheduleReconnect(Duration delay) { _reconnectTimer?.cancel(); _reconnectTimer = Timer(delay, () { - _averageLag.value = Duration.zero; if (!isDisposed) { _logger.fine('Reconnecting WebSocket.'); + _averageLag.value = Duration.zero; connect(); } else { _logger.warning(