From 7b938edee23802d2ac22461c449d0d6444d09880 Mon Sep 17 00:00:00 2001 From: tiptorrent development team Date: Sun, 19 Sep 2021 23:03:31 +0200 Subject: do not stop activating clients when direct download starts Do not break the loop after activating one client. Keep activating clients that can be redirected. If no redirection is found, then start direct download for this client (only one) but keep looping for clients that can be redirected. --- src/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core.c b/src/core.c index c107fd8..e0b1d44 100644 --- a/src/core.c +++ b/src/core.c @@ -367,7 +367,9 @@ void tip_client_activate_pending(bool redirect_only) ev_io_start(tip_main_loop, &cli->io); ev_timer_again(tip_main_loop, &cli->timer); cli->state = TIP_CLIENT_PROCESSING_REQUEST_2; - break; + /* only activate one direct download from server. */ + if (!redirected) + redirect_only = true; } } -- cgit v1.2.3-18-g5258