properly close the socket on onDone callback (#2746)
* properly close the socket on onDone callback * fix workflow * remove exceptions for fiat check script
Omar Hatem committed
Dec 17, 2025 at 19:16 UTC
3579d8c61fb01bc393a1dff7e7fcff6ca118ee8e
1 file changed
+3
-5
cw_bitcoin/lib/electrum.dart
+3
-5
@@ -129,11 +129,9 @@ class ElectrumClient {
129
printV("SOCKET CLOSED!!!!!");
130
unterminatedString = '';
131
try {
132
- if (host == socket?.address.host || socket == null) {
133
- _setConnectionStatus(ConnectionStatus.disconnected);
134
- socket?.destroy();
135
- socket = null;
136
- }
132
+ _setConnectionStatus(ConnectionStatus.disconnected);
133
+ socket?.destroy();
134
+ socket = null;
135
} catch (e) {
136
printV("onDone: $e");
137
}