Merge pull request #111 from lijie1129/refactor/resync
Improve the judgment condition of WS connection status in resync
This commit is contained in:
commit
bfb9d30eb9
@ -238,7 +238,7 @@ export class WebsocketProvider extends Observable {
|
||||
this._resyncInterval = 0
|
||||
if (resyncInterval > 0) {
|
||||
this._resyncInterval = /** @type {any} */ (setInterval(() => {
|
||||
if (this.ws) {
|
||||
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
||||
// resend sync step 1
|
||||
const encoder = encoding.createEncoder()
|
||||
encoding.writeVarUint(encoder, messageSync)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user