deno/ext
Divy Srivastava a411144219
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-14 22:17:39 +05:30
..
broadcast_channel refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-12 19:58:57 +00:00
cache refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-12 19:58:57 +00:00
console chore: forward v1.32.4 release commit to main (#18669) 2023-04-12 13:03:27 -04:00
crypto refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-12 19:58:57 +00:00
fetch refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-12 19:58:57 +00:00
ffi chore: forward v1.32.4 release commit to main (#18669) 2023-04-12 13:03:27 -04:00
fs chore: fix windows clippy errors (#18670) 2023-04-12 13:13:06 -04:00
http chore: forward v1.32.4 release commit to main (#18669) 2023-04-12 13:03:27 -04:00
io chore: forward v1.32.4 release commit to main (#18669) 2023-04-12 13:03:27 -04:00
kv chore: forward v1.32.4 release commit to main (#18669) 2023-04-12 13:03:27 -04:00
napi chore: forward v1.32.4 release commit to main (#18669) 2023-04-12 13:03:27 -04:00
net chore: forward v1.32.4 release commit to main (#18669) 2023-04-12 13:03:27 -04:00
node refactor(cli,ext,ops): cleanup regex with lazy-regex (#17296) 2023-04-13 03:08:01 +02:00
tls chore: forward v1.32.4 release commit to main (#18669) 2023-04-12 13:03:27 -04:00
url refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-12 19:58:57 +00:00
web refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-12 19:58:57 +00:00
webidl refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-12 19:58:57 +00:00
websocket fix(ext/websocket): Avoid write deadlock that requires read_frame to complete (#18705) 2023-04-14 22:17:39 +05:30
webstorage refactor(ext/webidl): remove object from 'requiredArguments' (#18674) 2023-04-12 19:58:57 +00:00