mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-18 12:11:36 +00:00
Merge pull request #332 from guanzo/bugfix
Check if socket is already connected in _openSocket().
This commit is contained in:
commit
4196c26917
@ -172,6 +172,9 @@ class WebSocketTracker extends Tracker {
|
||||
this.socket = socketPool[this.announceUrl]
|
||||
if (this.socket) {
|
||||
socketPool[this.announceUrl].consumers += 1
|
||||
if (this.socket.connected) {
|
||||
this._onSocketConnectBound()
|
||||
}
|
||||
} else {
|
||||
this.socket = socketPool[this.announceUrl] = new Socket(this.announceUrl)
|
||||
this.socket.consumers = 1
|
||||
|
Loading…
Reference in New Issue
Block a user