1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-14 19:37:59 -05:00
denoland-deno/ext
Charlie Bellini 8f7787f81b
fix(ext/websocket): don't throw exception when sending to closed socket (#26932)
[The WebSocket specification for the `send`
function](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send)
says:

> The browser will throw an exception if you call `send()` when the
connection is in the `CONNECTING` state. If you call `send()` when the
connection is in the `CLOSING` or `CLOSED` states, the browser will
silently discard the data.

and:

> ### Exceptions
> 
> `InvalidStateError`
[`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException)
> 
> Thrown if
[`WebSocket.readyState`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/readyState)
is `CONNECTING`.

This pull request fixes the current behavior to match the specification.
Also, I believe it fixes #17586.
2024-11-22 00:04:47 +01:00
..
broadcast_channel chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
cache chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
canvas chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
console chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
cron chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
crypto chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
fetch chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
ffi chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
fs chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
http chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
io chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
kv chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
napi chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
net chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
node chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
tls chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
url chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
web chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
webgpu chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
webidl chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00
websocket fix(ext/websocket): don't throw exception when sending to closed socket (#26932) 2024-11-22 00:04:47 +01:00
webstorage chore: forward v2.1.1 release commit to main (#26981) 2024-11-21 14:35:32 -05:00