Skip to content

Commit 8e29227

Browse files
committed
emit 'warning' for unsupported tracker protocol
1 parent 68f0d7e commit 8e29227

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

client.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ function Client (peerId, port, torrent, opts) {
7979
return new UDPTracker(self, announceUrl, trackerOpts)
8080
} else if ((protocol === 'ws:' || protocol === 'wss:') && webrtcSupport) {
8181
return new WebSocketTracker(self, announceUrl, trackerOpts)
82+
} else {
83+
process.nextTick(function () {
84+
var err = new Error('unsupported tracker protocol for ' + announceUrl)
85+
self.emit('warning', err)
86+
})
8287
}
8388
return null
8489
})

0 commit comments

Comments
 (0)