1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00

fix(ws) mask must not be set by default for server (denoland/deno_std#616)

Original: de99fcbaf9
This commit is contained in:
Yusuke Sakurai 2019-09-29 01:47:38 +09:00 committed by Ryan Dahl
parent 3cba0a4f4a
commit 04e4f10087

View file

@ -203,9 +203,9 @@ class WebSocketImpl implements WebSocket {
bufReader?: BufReader;
bufWriter?: BufWriter;
mask?: Uint8Array;
} = {}
}
) {
this.mask = opts.mask || createMask();
this.mask = opts.mask;
this.bufReader = opts.bufReader || new BufReader(conn);
this.bufWriter = opts.bufWriter || new BufWriter(conn);
}
@ -501,6 +501,7 @@ export async function connectWebSocket(
}
return new WebSocketImpl(conn, {
bufWriter,
bufReader
bufReader,
mask: createMask()
});
}