summaryrefslogtreecommitdiff
path: root/op_crates/websocket/01_websocket.js
diff options
context:
space:
mode:
authorDjDeveloper <43033058+DjDeveloperr@users.noreply.github.com>2021-02-21 22:21:46 +0530
committerGitHub <noreply@github.com>2021-02-21 17:51:46 +0100
commitfe1b512820cbdfd2b93ddfc8e935556878339425 (patch)
tree2d0bac58a55291a8f0275bcbe68ae4a432ca5626 /op_crates/websocket/01_websocket.js
parenteefd522f0490f9bb829de9342dcd1ed7aeacb42a (diff)
fix(op_crates/websocket): default to close code 1005 (#9339)
Currently if WebSocket is closed without code, it will error while on Chrome it would close with code 1005 instead. Co-authored-by: crowlKats <13135287+crowlKats@users.noreply.github.com>
Diffstat (limited to 'op_crates/websocket/01_websocket.js')
-rw-r--r--op_crates/websocket/01_websocket.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/op_crates/websocket/01_websocket.js b/op_crates/websocket/01_websocket.js
index d9b1455bd..4a303679b 100644
--- a/op_crates/websocket/01_websocket.js
+++ b/op_crates/websocket/01_websocket.js
@@ -350,6 +350,7 @@
});
event.target = this;
this.dispatchEvent(event);
+ core.close(this.#rid);
break;
}
@@ -364,6 +365,7 @@
const closeEv = new CloseEvent("close");
closeEv.target = this;
this.dispatchEvent(closeEv);
+ core.close(this.#rid);
break;
}