quick fix for the reconnection issue (#1671)

* Update electrum.dart

* Update electrum.dart

* Duration seconds: 5 [skip ci]
This commit is contained in:
Serhii
2024-09-09 21:08:21 +03:00
committed by GitHub
parent f279a222df
commit 125fdf8b62
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -113,9 +113,13 @@ class ElectrumClient {
},
onDone: () {
unterminatedString = '';
if (host == socket?.address.host) {
socket = null;
_setConnectionStatus(ConnectionStatus.disconnected);
try {
if (host == socket?.address.host) {
socket?.destroy();
_setConnectionStatus(ConnectionStatus.disconnected);
}
} catch(e) {
print(e.toString());
}
},
cancelOnError: true,
+1 -1
View File
@@ -2058,7 +2058,7 @@ abstract class ElectrumWalletBase
_isTryingToConnect = true;
Timer(Duration(seconds: 10), () {
Timer(Duration(seconds: 5), () {
if (this.syncStatus is NotConnectedSyncStatus || this.syncStatus is LostConnectionSyncStatus) {
this.electrumClient.connectToUri(
node!.uri,