diff options
-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]; |