mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-31 10:31:36 +00:00
Fix for unknown port
For example, in torrents from Yify their tracker has url "udp://tracker.yify-torrents.com/announce" in which case a crtitical error is shown because "port should be in range from 0 to 65535"
This commit is contained in:
parent
7858111646
commit
c8cc97afea
3
index.js
3
index.js
@ -208,6 +208,9 @@ Client.prototype._requestUdp = function (announceUrl, opts) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function send (message) {
|
function send (message) {
|
||||||
|
if(parsedUrl.port==null) {
|
||||||
|
parsedUrl.port=80;
|
||||||
|
}
|
||||||
socket.send(message, 0, message.length, parsedUrl.port, parsedUrl.hostname)
|
socket.send(message, 0, message.length, parsedUrl.port, parsedUrl.hostname)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user