summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-10-12 02:03:52 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2020-10-12 02:03:52 +0200
commitd310da13ba8d31c84978f96f542b9929a4e54ed8 (patch)
tree9c3e8c9a9d6b5050f9d9b5203c466bd5501b5a10 /sys/src/cmd/ip
parent3e880cd07d5d51005e48b7ea261a1419b84f134d (diff)
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.
Diffstat (limited to 'sys/src/cmd/ip')
-rw-r--r--sys/src/cmd/ip/torrent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/ip/torrent.c b/sys/src/cmd/ip/torrent.c
index 9f37a1f4e..374fd97ad 100644
--- a/sys/src/cmd/ip/torrent.c
+++ b/sys/src/cmd/ip/torrent.c
@@ -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;