mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
lib/client: reset state when websocket is closed
This commit is contained in:
parent
80e0175d36
commit
8a5fa4d5c2
1 changed files with 4 additions and 0 deletions
|
@ -74,6 +74,10 @@ export default class Client extends EventTarget {
|
|||
console.log("Connection closed");
|
||||
this.ws = null;
|
||||
this.setStatus(Client.Status.DISCONNECTED);
|
||||
this.availableCaps = {};
|
||||
this.enabledCaps = {};
|
||||
this.batches = new Map();
|
||||
this.pendingHistory = Promise.resolve(null);
|
||||
|
||||
if (this.autoReconnect) {
|
||||
console.info("Reconnecting to server in " + RECONNECT_DELAY_SEC + " seconds");
|
||||
|
|
Loading…
Reference in a new issue