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/core.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core.h') diff --git a/src/core.h b/src/core.h index c1ce388..4b35f82 100644 --- a/src/core.h +++ b/src/core.h @@ -55,6 +55,11 @@ static inline int tip_client_socket(const struct tip_client *cli) return cli->io.fd; } +static inline bool tip_client_large_file(const struct tip_client *cli) +{ + return cli->size > FILE_SIZE_THRESHOLD; +} + void tip_client_pending(struct tip_client *cli); bool tip_client_redirect(struct tip_client *cli); -- cgit v1.2.3-18-g5258