From 74fda2cad7d7e0c1bd6c32b2c6d992fc47c3cf78 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Wed, 21 Aug 2024 11:16:21 +0530 Subject: [PATCH] fix(ext/websocket): unhandled close rejection in WebsocketStream Fixes https://github.com/denoland/deno/issues/25077 --- ext/websocket/02_websocketstream.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/websocket/02_websocketstream.js b/ext/websocket/02_websocketstream.js index 92b1c6eae5539f..838ae3d4ced44a 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) ) {