From 669089d6b14591691154f3cacd7c0e5d0a28bd0a Mon Sep 17 00:00:00 2001 From: tiptorrent development team Date: Tue, 28 Sep 2021 10:03:49 +0200 Subject: prioritize redirections over direct server download testbed shows 95% use of redirections for data transfers. --- src/handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handler.c b/src/handler.c index 982ad02..2b9c6a0 100644 --- a/src/handler.c +++ b/src/handler.c @@ -160,8 +160,8 @@ int tip_client_state_process_payload(struct tip_client *cli) cli->allow_redirect = allow_redirect; num_clients++; - if (num_clients > max_clients) { - if (!tip_client_redirect(cli)) { + if (!tip_client_redirect(cli)) { + if (num_clients > max_clients) { tip_client_pending(cli); return 1; } -- cgit v1.2.3-18-g5258