1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00
denoland-deno/ext
Divy Srivastava 001a9a5856
fix(ext/websocket): Avoid write deadlock that requires read_frame to complete (#18705)
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.
2023-04-18 17:41:51 +02:00
..
broadcast_channel refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-18 17:41:49 +02:00
cache refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-18 17:41:49 +02:00
console 1.32.4 (#18668) 2023-04-12 17:17:55 +02:00
crypto refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-18 17:41:49 +02:00
fetch refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-18 17:41:49 +02:00
ffi 1.32.4 (#18668) 2023-04-12 17:17:55 +02:00
fs chore: fix windows clippy errors (#18670) 2023-04-18 17:41:49 +02:00
http 1.32.4 (#18668) 2023-04-12 17:17:55 +02:00
io 1.32.4 (#18668) 2023-04-12 17:17:55 +02:00
kv 1.32.4 (#18668) 2023-04-12 17:17:55 +02:00
napi 1.32.4 (#18668) 2023-04-12 17:17:55 +02:00
net 1.32.4 (#18668) 2023-04-12 17:17:55 +02:00
node refactor(cli,ext,ops): cleanup regex with lazy-regex (#17296) 2023-04-18 17:41:50 +02:00
tls 1.32.4 (#18668) 2023-04-12 17:17:55 +02:00
url refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-18 17:41:49 +02:00
web refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-18 17:41:49 +02:00
webidl refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-18 17:41:49 +02:00
websocket fix(ext/websocket): Avoid write deadlock that requires read_frame to complete (#18705) 2023-04-18 17:41:51 +02:00
webstorage refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-18 17:41:49 +02:00