From 27402caabadfe0d5114a8999bdae413202f3d19c Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 25 Sep 2024 02:46:07 +0200 Subject: Release DFU/Recovery client on disconnect and Increase timeout for port DFU -> KIS --- src/idevicerestore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/idevicerestore.c') diff --git a/src/idevicerestore.c b/src/idevicerestore.c index 2dd7eb8..bf58a3e 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -817,8 +817,9 @@ int idevicerestore_start(struct idevicerestore_client_t* client) } return -2; } + dfu_client_free(client); debug("Waiting for device to reconnect in DFU mode...\n"); - cond_wait_timeout(&client->device_event_cond, &client->device_event_mutex, 5000); + cond_wait_timeout(&client->device_event_cond, &client->device_event_mutex, 20000); if (client->mode != MODE_DFU || (client->flags & FLAG_QUIT)) { mutex_unlock(&client->device_event_mutex); if (!(client->flags & FLAG_QUIT)) { @@ -1416,6 +1417,7 @@ int idevicerestore_start(struct idevicerestore_client_t* client) } return -2; } + recovery_client_free(client); debug("Waiting for device to reconnect in recovery mode...\n"); cond_wait_timeout(&client->device_event_cond, &client->device_event_mutex, 60000); if (client->mode != MODE_RECOVERY || (client->flags & FLAG_QUIT)) { -- cgit v1.1-32-gdbae