mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 09:29:48 +00:00
quick fix for the reconnection issue (#1671)
* Update electrum.dart * Update electrum.dart * Duration seconds: 5 [skip ci]
This commit is contained in:
parent
f279a222df
commit
125fdf8b62
2 changed files with 8 additions and 4 deletions
|
@ -113,9 +113,13 @@ class ElectrumClient {
|
||||||
},
|
},
|
||||||
onDone: () {
|
onDone: () {
|
||||||
unterminatedString = '';
|
unterminatedString = '';
|
||||||
if (host == socket?.address.host) {
|
try {
|
||||||
socket = null;
|
if (host == socket?.address.host) {
|
||||||
_setConnectionStatus(ConnectionStatus.disconnected);
|
socket?.destroy();
|
||||||
|
_setConnectionStatus(ConnectionStatus.disconnected);
|
||||||
|
}
|
||||||
|
} catch(e) {
|
||||||
|
print(e.toString());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancelOnError: true,
|
cancelOnError: true,
|
||||||
|
|
|
@ -2058,7 +2058,7 @@ abstract class ElectrumWalletBase
|
||||||
|
|
||||||
_isTryingToConnect = true;
|
_isTryingToConnect = true;
|
||||||
|
|
||||||
Timer(Duration(seconds: 10), () {
|
Timer(Duration(seconds: 5), () {
|
||||||
if (this.syncStatus is NotConnectedSyncStatus || this.syncStatus is LostConnectionSyncStatus) {
|
if (this.syncStatus is NotConnectedSyncStatus || this.syncStatus is LostConnectionSyncStatus) {
|
||||||
this.electrumClient.connectToUri(
|
this.electrumClient.connectToUri(
|
||||||
node!.uri,
|
node!.uri,
|
||||||
|
|
Loading…
Reference in a new issue