We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3df4809 commit 6d2930aCopy full SHA for 6d2930a
lib/receiver.js
@@ -453,14 +453,12 @@ class Receiver extends stream.Writable {
453
this.emit('conclude', code, buf.toString());
454
this.end();
455
}
456
-
457
- this._state = GET_INFO;
458
- return;
+ } else if (this._opcode === 0x09) {
+ this.emit('ping', data);
+ } else {
459
+ this.emit('pong', data);
460
461
- if (this._opcode === 0x09) this.emit('ping', data);
462
- else this.emit('pong', data);
463
464
this._state = GET_INFO;
465
466
0 commit comments