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