summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2022-02-08 17:19:23 +0100
committertiptorrent development team <tiptorrent@soleta.eu>2022-02-08 17:27:32 +0100
commit900ae1d783dc34c8215480839b932c2438533f4a (patch)
treed7076f63366e863e7c1ff1446f523537b5e936b8 /src/main.c
parentace36ad51010129b172cf68cea9e9df28e4f92aa (diff)
do not reset number of retries counter
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 6b2b8c0..9771370 100644
--- a/src/main.c
+++ b/src/main.c
@@ -528,9 +528,12 @@ static uint32_t select_file_chunk(bool *file_chunk)
static void tip_client_reset_state(struct tip_client *cli, int fd,
uint64_t chunk_offset)
{
+ int num_retries = cli->num_retries;
+
memset(cli, 0, sizeof(*cli));
cli->chunk_offset = chunk_offset;
cli->fd = fd;
+ cli->num_retries = num_retries;
}
static char _filename[PATH_MAX + 1];