summaryrefslogtreecommitdiff
path: root/std/ws
diff options
context:
space:
mode:
Diffstat (limited to 'std/ws')
-rw-r--r--std/ws/mod.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/std/ws/mod.ts b/std/ws/mod.ts
index f58828aea..4d3f79f74 100644
--- a/std/ws/mod.ts
+++ b/std/ws/mod.ts
@@ -262,7 +262,7 @@ class WebSocketImpl implements WebSocket {
payloadsLength = 0;
}
break;
- case OpCode.Close:
+ case OpCode.Close: {
// [0x12, 0x34] -> 0x1234
const code = (frame.payload[0] << 8) | frame.payload[1];
const reason = decode(
@@ -271,6 +271,7 @@ class WebSocketImpl implements WebSocket {
await this.close(code, reason);
yield { code, reason };
return;
+ }
case OpCode.Ping:
await this.enqueue({
opcode: OpCode.Pong,