mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
a411144219
Fixes https://github.com/denoland/deno/issues/18700 Timeline of the events that lead to the bug. 1. WebSocket handshake complete 2. Server on `read_frame` holding an AsyncRefCell borrow of the WebSocket stream. 3. Client sends a TXT frame after a some time 4. Server recieves the frame and goes back to `read_frame`. 5. After some time, Server starts a `write_frame` but `read_frame` is still holding a borrow! ^--- Locked. read_frame needs to complete so we can resume the write. This commit changes all writes to directly borrow the `fastwebsocket::WebSocket` resource under the assumption that it won't affect ongoing reads. |
||
---|---|---|
.. | ||
01_websocket.js | ||
02_websocketstream.js | ||
Cargo.toml | ||
lib.deno_websocket.d.ts | ||
lib.rs | ||
README.md | ||
server.rs |
deno_websocket
This op crate implements the websocket functions of Deno.
Spec: https://html.spec.whatwg.org/multipage/web-sockets.html