From 3579d8c61fb01bc393a1dff7e7fcff6ca118ee8e Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Wed, 17 Dec 2025 19:16:41 +0200 Subject: [PATCH] properly close the socket on onDone callback (#2746) * properly close the socket on onDone callback * fix workflow * remove exceptions for fiat check script --- cw_bitcoin/lib/electrum.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cw_bitcoin/lib/electrum.dart b/cw_bitcoin/lib/electrum.dart index ee8e09675..b6469acca 100644 --- a/cw_bitcoin/lib/electrum.dart +++ b/cw_bitcoin/lib/electrum.dart @@ -129,11 +129,9 @@ class ElectrumClient { printV("SOCKET CLOSED!!!!!"); unterminatedString = ''; try { - if (host == socket?.address.host || socket == null) { - _setConnectionStatus(ConnectionStatus.disconnected); - socket?.destroy(); - socket = null; - } + _setConnectionStatus(ConnectionStatus.disconnected); + socket?.destroy(); + socket = null; } catch (e) { printV("onDone: $e"); }