mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
quick fix for the reconnection issue (#1671)
* Update electrum.dart * Update electrum.dart * Duration seconds: 5 [skip ci]
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user