mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2024-12-13 19:06:27 +00:00
emit 'warning' for unsupported tracker protocol
This commit is contained in:
parent
68f0d7e46d
commit
8e29227003
@ -79,6 +79,11 @@ function Client (peerId, port, torrent, opts) {
|
|||||||
return new UDPTracker(self, announceUrl, trackerOpts)
|
return new UDPTracker(self, announceUrl, trackerOpts)
|
||||||
} else if ((protocol === 'ws:' || protocol === 'wss:') && webrtcSupport) {
|
} else if ((protocol === 'ws:' || protocol === 'wss:') && webrtcSupport) {
|
||||||
return new WebSocketTracker(self, announceUrl, trackerOpts)
|
return new WebSocketTracker(self, announceUrl, trackerOpts)
|
||||||
|
} else {
|
||||||
|
process.nextTick(function () {
|
||||||
|
var err = new Error('unsupported tracker protocol for ' + announceUrl)
|
||||||
|
self.emit('warning', err)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user