From b07785d2d1b1ed42ea5f863c006f6ee60eceabc2 Mon Sep 17 00:00:00 2001 From: tiptorrent development team Date: Thu, 9 Sep 2021 12:41:27 +0200 Subject: activate pending clients only for large files small files should not activate pending clients, otherwise max_clients is not fulfilled. --- src/handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/handler.c') diff --git a/src/handler.c b/src/handler.c index 9bcec71..ab9fdc4 100644 --- a/src/handler.c +++ b/src/handler.c @@ -101,7 +101,7 @@ int tip_client_state_process_payload(struct tip_client *cli) cli->allow_redirect = allow_redirect; num_clients++; - if (cli->size > FILE_SIZE_THRESHOLD && num_clients > max_clients) { + if (tip_client_large_file(cli) && num_clients > max_clients) { if (!tip_client_redirect(cli)) { tip_client_pending(cli); return 1; -- cgit v1.2.3-18-g5258