Skip to content

Commit

Permalink
fix racecondition: make sure not to try to delete runloop before it e…
Browse files Browse the repository at this point in the history
…ven started
  • Loading branch information
tihmstar committed Dec 14, 2023
1 parent 2a34239 commit ef3fedd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libirecovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -3030,6 +3030,7 @@ irecv_error_t irecv_device_event_unsubscribe(irecv_device_event_context_t contex
if (num == 0 && th_event_handler != THREAD_T_NULL && thread_alive(th_event_handler)) {
#ifdef HAVE_IOKIT
if (iokit_runloop) {
while (!CFRunLoopIsWaiting(iokit_runloop)) usleep(420);
CFRunLoopStop(iokit_runloop);
iokit_runloop = NULL;
}
Expand Down

0 comments on commit ef3fedd

Please sign in to comment.