fix(core): update
This commit is contained in:
parent
c5e60d804a
commit
71452a293f
@ -212,8 +212,10 @@ export class SmartsocketClient {
|
|||||||
|
|
||||||
if (this.autoReconnect && useAutoReconnectSetting && this.eventStatus !== 'connecting') {
|
if (this.autoReconnect && useAutoReconnectSetting && this.eventStatus !== 'connecting') {
|
||||||
this.updateStatus('connecting');
|
this.updateStatus('connecting');
|
||||||
await this.tryDebouncedReconnect();
|
console.log('debounced reconnect!');
|
||||||
|
await plugins.smartdelay.delayForRandom(10000, 20000);
|
||||||
this.disconnectRunning = false;
|
this.disconnectRunning = false;
|
||||||
|
await this.connect();
|
||||||
} else {
|
} else {
|
||||||
this.disconnectRunning = false;
|
this.disconnectRunning = false;
|
||||||
}
|
}
|
||||||
@ -227,15 +229,6 @@ export class SmartsocketClient {
|
|||||||
await this.disconnect();
|
await this.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* try a reconnection
|
|
||||||
*/
|
|
||||||
public async tryDebouncedReconnect() {
|
|
||||||
console.log('debounced reconnect!');
|
|
||||||
await plugins.smartdelay.delayForRandom(10000, 20000);
|
|
||||||
await this.connect();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* dispatches a server call
|
* dispatches a server call
|
||||||
* @param functionNameArg
|
* @param functionNameArg
|
||||||
|
Loading…
Reference in New Issue
Block a user