ip/torrent: try harder allocating ports
we used to only allocate ports from 6881 to 6890, which limits the maximum of parallel torrents to 9. this change make it go up to 9000, which gives us at best 2120 ports, which is overkill but ports might be randomly occupied by other connections.
This commit is contained in:
parent
3e880cd07d
commit
d310da13ba
1 changed files with 1 additions and 1 deletions
|
@ -605,7 +605,7 @@ server(void)
|
|||
|
||||
afd = -1;
|
||||
nprocs = 0;
|
||||
for(port=6881; port<6890; port++){
|
||||
for(port=6881; port<9000; port++){
|
||||
snprint(addr, sizeof(addr), "tcp!*!%d", port);
|
||||
if((afd = announce(addr, adir)) >= 0)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue