diff options
Diffstat (limited to 'client-web/source/protocol/mod.ts')
-rw-r--r-- | client-web/source/protocol/mod.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client-web/source/protocol/mod.ts b/client-web/source/protocol/mod.ts index d554820..de4293d 100644 --- a/client-web/source/protocol/mod.ts +++ b/client-web/source/protocol/mod.ts @@ -21,7 +21,7 @@ export class SignalingConnection { constructor() { } async connect(): Promise<SignalingConnection> { log("ws", "connecting…") - const ws_url = new URL(`${window.location.protocol.endsWith("s:") ? "wss" : "ws"}://${window.location.host}/signaling`) + const ws_url = new URL(`${globalThis.location.protocol.endsWith("s:") ? "wss" : "ws"}://${globalThis.location.host}/signaling`) this.websocket = new WebSocket(ws_url) this.websocket.onerror = () => this.on_error() this.websocket.onclose = () => this.on_close() @@ -38,7 +38,7 @@ export class SignalingConnection { on_close() { log("ws", "websocket closed"); setTimeout(() => { - window.location.reload() + globalThis.location.reload() }, 1000) } on_open() { |