summaryrefslogtreecommitdiffstats
path: root/src/handler.c
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-09 12:41:27 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:48:03 +0200
commitb07785d2d1b1ed42ea5f863c006f6ee60eceabc2 (patch)
tree19777c08b4ee4bf38b4db7aeb55540c7b575b1bb /src/handler.c
parent1b890bd11b0a856bd2e4cd2377db8c6f3f656d3d (diff)
activate pending clients only for large files
small files should not activate pending clients, otherwise max_clients is not fulfilled.
Diffstat (limited to 'src/handler.c')
-rw-r--r--src/handler.c2
1 files changed, 1 insertions, 1 deletions
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;