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: () {
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue