summaryrefslogtreecommitdiff
path: root/ext/websocket/01_websocket.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-04-25 13:53:06 +0200
committerGitHub <noreply@github.com>2023-04-25 13:53:06 +0200
commit531754c35497568aa2f19179344eb9e205c9a4b3 (patch)
treebd8f843ff60cc311083f1a9851b51c7d271dea59 /ext/websocket/01_websocket.js
parent21c888d4dbe2175333cc9d58b227661e2d0185d8 (diff)
refactor(ext/websocket): use specialized ops (#18819)
Instead of relying on `op_ws_send` to send different kinds of messages, use specialized ops everywhere.
Diffstat (limited to 'ext/websocket/01_websocket.js')
-rw-r--r--ext/websocket/01_websocket.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js
index 60378b675..1b7a45ce0 100644
--- a/ext/websocket/01_websocket.js
+++ b/ext/websocket/01_websocket.js
@@ -534,13 +534,7 @@ class WebSocket extends EventTarget {
clearTimeout(this[_idleTimeoutTimeout]);
this[_idleTimeoutTimeout] = setTimeout(async () => {
if (this[_readyState] === OPEN) {
- await core.opAsync(
- "op_ws_send",
- this[_rid],
- {
- kind: "ping",
- },
- );
+ await core.opAsync("op_ws_send_ping", this[_rid]);
this[_idleTimeoutTimeout] = setTimeout(async () => {
if (this[_readyState] === OPEN) {
this[_readyState] = CLOSING;