Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit d2be22f

Browse files
committed
feat(socket): pass socket ref to ready event
1 parent 1d47aed commit d2be22f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Connection/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,11 @@ export default class Connection extends Emitter {
375375
return
376376
}
377377

378+
if (wsp.isPongPacket(packet)) {
379+
debug('pong packet')
380+
return
381+
}
382+
378383
debug('invalid packet type %d', packet.t)
379384
}
380385

src/Socket/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default class Socket {
6363
*/
6464
joinAck () {
6565
this.state = 'open'
66-
this.emitter.emit('ready')
66+
this.emitter.emit('ready', this)
6767

6868
/**
6969
* Process queued events, before the subscription was ready

0 commit comments

Comments
 (0)