From 1e2d95a8038346d38f1cebeabe0ad64ea874b7fe Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 20 Mar 2017 19:15:40 +0100 Subject: [PATCH] ip/torrent: exit immidiately when file is complete after verification and not being in seed mode --- sys/src/cmd/ip/torrent.c | 3 +++ 1 file changed, 3 insertions(+) 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)){