diff options
author | tiptorrent development team <tiptorrent@soleta.eu> | 2022-02-08 17:19:23 +0100 |
---|---|---|
committer | tiptorrent development team <tiptorrent@soleta.eu> | 2022-02-08 17:27:32 +0100 |
commit | 900ae1d783dc34c8215480839b932c2438533f4a (patch) | |
tree | d7076f63366e863e7c1ff1446f523537b5e936b8 /src | |
parent | ace36ad51010129b172cf68cea9e9df28e4f92aa (diff) |
do not reset number of retries counter
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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]; |