diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-04-26 15:37:38 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 15:37:38 +0530 |
commit | 9d7e3f84c852a538937399e542fe4fecb9d52f08 (patch) | |
tree | 97b8358b711e14d3af14d45aaf8d3ca267abe3c1 /ext/websocket/02_websocketstream.js | |
parent | 106e4c475febe3e08fa7fc632e044fe75a792cc3 (diff) |
chore(ext/websocket): remove ping frame handling (#18847)
Automatically done in the fastwebsockets crate
Diffstat (limited to 'ext/websocket/02_websocketstream.js')
-rw-r--r-- | ext/websocket/02_websocketstream.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/ext/websocket/02_websocketstream.js b/ext/websocket/02_websocketstream.js index f545d7a99..8e7100cdb 100644 --- a/ext/websocket/02_websocketstream.js +++ b/ext/websocket/02_websocketstream.js @@ -236,7 +236,7 @@ class WebSocketStream { }, }); const pull = async (controller) => { - const { 0: kind, 1: value } = await core.opAsync( + const { 0: kind, 1: value } = await core.opAsync2( "op_ws_next_event", this[_rid], ); @@ -249,7 +249,11 @@ class WebSocketStream { controller.enqueue(value); break; } - case 5: { + case 2: { + /* pong */ + break; + } + case 3: { /* error */ const err = new Error(value); this[_closed].reject(err); @@ -257,17 +261,7 @@ class WebSocketStream { core.tryClose(this[_rid]); break; } - case 3: { - /* ping */ - await core.opAsync("op_ws_send_pong", this[_rid]); - await pull(controller); - break; - } - case 2: { - /* pong */ - break; - } - case 6: { + case 4: { /* closed */ this[_closed].resolve(undefined); core.tryClose(this[_rid]); |