diff options
Diffstat (limited to 'ext/websocket/01_websocket.js')
-rw-r--r-- | ext/websocket/01_websocket.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js index fdcb0be99..a52996d8d 100644 --- a/ext/websocket/01_websocket.js +++ b/ext/websocket/01_websocket.js @@ -502,12 +502,15 @@ class WebSocket extends EventTarget { clearTimeout(this[_idleTimeoutTimeout]); this[_idleTimeoutTimeout] = setTimeout(async () => { if (this[_readyState] === OPEN) { - await op_ws_send_ping(this[_rid]); + await PromisePrototypeCatch(op_ws_send_ping(this[_rid]), () => {}); this[_idleTimeoutTimeout] = setTimeout(async () => { if (this[_readyState] === OPEN) { this[_readyState] = CLOSING; const reason = "No response from ping frame."; - await op_ws_close(this[_rid], 1001, reason); + await PromisePrototypeCatch( + op_ws_close(this[_rid], 1001, reason), + () => {}, + ); this[_readyState] = CLOSED; const errEvent = new ErrorEvent("error", { |