From 30c860d8c359f4fd4e6c27d4a9328ba4fbcfdfaf Mon Sep 17 00:00:00 2001 From: Josh Babb Date: Thu, 25 May 2023 15:11:04 -0500 Subject: [PATCH] nullify socket better safe than sorry! --- lib/electrumx_rpc/rpc2.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/electrumx_rpc/rpc2.dart b/lib/electrumx_rpc/rpc2.dart index 64306fc27..c334b25a0 100644 --- a/lib/electrumx_rpc/rpc2.dart +++ b/lib/electrumx_rpc/rpc2.dart @@ -56,6 +56,8 @@ class JsonRPC { level: LogLevel.Info, ); _socket?.destroy(); + _socket = null; // is this redundant? + // should we also cancel and/or null the subscription? if (_requestQueue.isNotEmpty) { Logging.instance.log(