(hopefully) fix websockets breaking on secure origins

This commit is contained in:
CoolElectronics 2023-08-20 20:45:40 -04:00
parent 15160ca408
commit af5be8e9a2
No known key found for this signature in database
GPG key ID: F63593D168636C50

View file

@ -158,7 +158,7 @@ export class AdriftBareClient extends Client {
webSocketImpl: WebSocketImpl, webSocketImpl: WebSocketImpl,
arrayBufferImpl: ArrayBufferConstructor arrayBufferImpl: ArrayBufferConstructor
): WebSocket { ): WebSocket {
const ws = new webSocketImpl("ws:null", protocols); const ws = new webSocketImpl("wss:null", protocols);
// this will error. that's okay // this will error. that's okay
let initalCloseHappened = false; let initalCloseHappened = false;
ws.addEventListener("close", (e) => { ws.addEventListener("close", (e) => {