Skip to content

Commit 8386072

Browse files
authored
Update parse-udp.js
hardcoded src peer port for udp tracker.
1 parent 3cec3fa commit 8386072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/server/parse-udp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function parseUdpRequest (msg, rinfo) {
4343
common.MAX_ANNOUNCE_PEERS
4444
)
4545

46-
params.port = msg.readUInt16BE(96) || rinfo.port // optional
46+
params.port = rinfo.port // optional
4747
params.addr = params.ip + ':' + params.port // TODO: ipv6 brackets
4848
params.compact = 1 // udp is always compact
4949
} else if (params.action === common.ACTIONS.SCRAPE) { // scrape message

0 commit comments

Comments
 (0)