1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix(ext/websocket): unhandled close rejection in WebsocketStream (#25125)

Fixes https://github.com/denoland/deno/issues/25077
This commit is contained in:
Divy Srivastava 2024-08-21 14:00:23 -07:00 committed by GitHub
parent c22ff197db
commit 9aaad3064a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -323,6 +323,8 @@ class WebSocketStream {
} catch (_) {
// needed to ignore warnings & assertions
}
}, () => {
// needed to ignore warnings & assertions
});
PromisePrototypeThen(this[_closeSent].promise, () => {
@ -335,7 +337,6 @@ class WebSocketStream {
cancel: async (reason) => {
let closeCode = null;
let reasonString = "";
if (
ObjectPrototypeIsPrototypeOf(WebSocketErrorPrototype, reason)
) {