diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-03-20 19:15:40 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-03-20 19:15:40 +0100 |
commit | 1e2d95a8038346d38f1cebeabe0ad64ea874b7fe (patch) | |
tree | 1d9a34e9d39527b9bd2504cbc664880520efa538 /sys/src/cmd/ip | |
parent | b7c05975f53cd0acea81c9f1cfed302328ec8478 (diff) |
ip/torrent: exit immidiately when file is complete after verification and not being in seed mode
Diffstat (limited to 'sys/src/cmd/ip')
-rw-r--r-- | sys/src/cmd/ip/torrent.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/src/cmd/ip/torrent.c b/sys/src/cmd/ip/torrent.c index fc324977b..3cc1aeb09 100644 --- a/sys/src/cmd/ip/torrent.c +++ b/sys/src/cmd/ip/torrent.c @@ -1352,6 +1352,9 @@ main(int argc, char *argv[]) while(waitpid() >= 0) ; + if(finished() && !sflag) + exits(0); + srand(truerand()); atnotify(catch, 1); switch(i = rfork(RFPROC|RFMEM|RFNOTEG)){ |