summaryrefslogtreecommitdiffstats
path: root/src/core.c
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-19 23:03:31 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:49:01 +0200
commit7b938edee23802d2ac22461c449d0d6444d09880 (patch)
tree33c210e8e9b871066d2883aabf5ddcdb07d5e755 /src/core.c
parent44287f9e6722bcdbdb2cda679407a265697cbeb7 (diff)
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.
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c4
1 files changed, 3 insertions, 1 deletions
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;
}
}