diff options
author | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-27 11:27:30 +0200 |
---|---|---|
committer | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-29 15:49:21 +0200 |
commit | 6010fe62fda49ffb6a3fa7038b0c2feb61767263 (patch) | |
tree | 6551b45191468e49585d4efdb8b623bf9748db19 /src/core.c | |
parent | 6a81079dc1a9d4deea7d8faa787baed2ffe80556 (diff) |
download checksum file directly from server
Remove assumption on small file to shortcircuit the redirect logic.
Diffstat (limited to 'src/core.c')
-rw-r--r-- | src/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -49,7 +49,7 @@ static void tip_client_release(struct ev_loop *loop, struct tip_client *cli) free((void *)cli->path); if (cli->method == TIP_METHOD_GET) { - if (tip_client_large_file(cli)) { + if (!tip_client_checksum_file(cli)) { num_clients--; if (!cli->redirect) tip_client_activate_pending(false); @@ -192,7 +192,7 @@ static void tip_client_read_cb(struct ev_loop *loop, struct ev_io *io, int event } return; shutdown: - if (cli->size > FILE_SIZE_THRESHOLD) + if (!tip_client_checksum_file(cli)) tip_client_redirect_create(cli); close: tip_client_release(loop, cli); |