Skip to content

Commit

Permalink
Release DFU/Recovery client on disconnect and Increase timeout for po…
Browse files Browse the repository at this point in the history
…rt DFU -> KIS
  • Loading branch information
nikias committed Sep 25, 2024
1 parent be6751c commit 27402ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/idevicerestore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 27402ca

Please sign in to comment.