Skip to content

Commit 6d2930a

Browse files
committed
[minor] Fix style nit
1 parent 3df4809 commit 6d2930a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/receiver.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,14 +453,12 @@ class Receiver extends stream.Writable {
453453
this.emit('conclude', code, buf.toString());
454454
this.end();
455455
}
456-
457-
this._state = GET_INFO;
458-
return;
456+
} else if (this._opcode === 0x09) {
457+
this.emit('ping', data);
458+
} else {
459+
this.emit('pong', data);
459460
}
460461

461-
if (this._opcode === 0x09) this.emit('ping', data);
462-
else this.emit('pong', data);
463-
464462
this._state = GET_INFO;
465463
}
466464
}

0 commit comments

Comments
 (0)