summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/restore.c b/src/restore.c
index 46e4a0f..ab7e50d 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -2299,12 +2299,12 @@ int restore_device(struct idevicerestore_client_t* client, plist_t build_identit
message = NULL;
}
- if (fdr_control_channel) {
- fdr_disconnect(fdr_control_channel);
- if (fdr_thread) {
+ if (thread_alive(fdr_thread)) {
+ if (fdr_control_channel) {
+ fdr_disconnect(fdr_control_channel);
thread_join(fdr_thread);
+ fdr_control_channel = NULL;
}
- fdr_control_channel = NULL;
}
restore_client_free(client);