summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2024-08-21 14:00:23 -0700
committerGitHub <noreply@github.com>2024-08-21 23:00:23 +0200
commit9aaad3064a412b24e88e308750e038d4e1df6f3c (patch)
treea55ec8b80d43e0ca8a528440fd25c500dfef6118
parentc22ff197dbcbf3fb589bb5dfcf0c4fdc3d72f0a0 (diff)
fix(ext/websocket): unhandled close rejection in WebsocketStream (#25125)
Fixes https://github.com/denoland/deno/issues/25077
-rw-r--r--ext/websocket/02_websocketstream.js3
1 files changed, 2 insertions, 1 deletions
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)
) {