From 9aaad3064a412b24e88e308750e038d4e1df6f3c Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Wed, 21 Aug 2024 14:00:23 -0700 Subject: fix(ext/websocket): unhandled close rejection in WebsocketStream (#25125) Fixes https://github.com/denoland/deno/issues/25077 --- ext/websocket/02_websocketstream.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/websocket/02_websocketstream.js') diff --git a/ext/websocket/02_websocketstream.js b/ext/websocket/02_websocketstream.js index 92b1c6eae..838ae3d4c 100644 --- a/ext/websocket/02_websocketstream.js +++ b/ext/websocket/02_websocketstream.js @@ -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) ) { -- cgit v1.2.3