Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
fix: handle reconnection to signaling server
Browse files Browse the repository at this point in the history
  • Loading branch information
pgte committed May 17, 2017
1 parent faf8c23 commit 939aa8d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ class WebRTCStar {
listener.emit('close')
})

listener.io.once('connect', () => {
listener.io.on('ws-handshake', incommingDial)
listener.io.on('ws-peer', this._peerDiscovered)

listener.io.on('connect', () => {
listener.io.emit('ss-join', ma.toString())
listener.io.on('ws-handshake', incommingDial)
listener.io.on('ws-peer', this._peerDiscovered)
listener.emit('listening')
callback()
})
Expand Down

0 comments on commit 939aa8d

Please sign in to comment.