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. |
||
---|---|---|
.. | ||
integration | ||
node_compat | ||
testdata | ||
unit | ||
unit_node | ||
integration_tests.rs |