mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-15 00:47:46 +01:00
lib/client: reset state when websocket is closed
This commit is contained in:
parent
80e0175d36
commit
8a5fa4d5c2
@ -74,6 +74,10 @@ export default class Client extends EventTarget {
|
|||||||
console.log("Connection closed");
|
console.log("Connection closed");
|
||||||
this.ws = null;
|
this.ws = null;
|
||||||
this.setStatus(Client.Status.DISCONNECTED);
|
this.setStatus(Client.Status.DISCONNECTED);
|
||||||
|
this.availableCaps = {};
|
||||||
|
this.enabledCaps = {};
|
||||||
|
this.batches = new Map();
|
||||||
|
this.pendingHistory = Promise.resolve(null);
|
||||||
|
|
||||||
if (this.autoReconnect) {
|
if (this.autoReconnect) {
|
||||||
console.info("Reconnecting to server in " + RECONNECT_DELAY_SEC + " seconds");
|
console.info("Reconnecting to server in " + RECONNECT_DELAY_SEC + " seconds");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user