summaryrefslogtreecommitdiff
path: root/client-web/source/protocol/mod.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source/protocol/mod.ts')
-rw-r--r--client-web/source/protocol/mod.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/client-web/source/protocol/mod.ts b/client-web/source/protocol/mod.ts
index f976f23..03afa8e 100644
--- a/client-web/source/protocol/mod.ts
+++ b/client-web/source/protocol/mod.ts
@@ -19,6 +19,7 @@ export class SignalingConnection {
const ws_url = new URL(`${window.location.protocol.endsWith("s:") ? "wss" : "ws"}://${window.location.host}/signaling/${encodeURIComponent(this.signaling_id)}`)
this.websocket = new WebSocket(ws_url)
this.websocket.onerror = () => this.on_error()
+ this.websocket.onclose = () => this.on_close()
this.websocket.onmessage = e => {
if (typeof e.data == "string") this.on_message(e.data)
}