diff options
author | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-09 12:41:27 +0200 |
---|---|---|
committer | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-29 15:48:03 +0200 |
commit | b07785d2d1b1ed42ea5f863c006f6ee60eceabc2 (patch) | |
tree | 19777c08b4ee4bf38b4db7aeb55540c7b575b1bb /src/core.h | |
parent | 1b890bd11b0a856bd2e4cd2377db8c6f3f656d3d (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/core.h')
-rw-r--r-- | src/core.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |