libimobiledevice/libusbmuxd

usbmuxd_events_unsubscribe is blocked about 2~3 secs

yanqinglu opened this issue · 1 comments

If users don't install iTunes, the usbmuxd_events_unsubscribe will be blocked about 2~3 secs.
usbmuxd_events_unsubscribe calls thread_join to wait the thread to be finished, but the sleep in usbmuxd_listen_poll delay it. Should not use the sleep function, it's better to use a event to wait for timeout, then set the event in usbmuxd_events_unsubscribe .

By the way, the select calling in socket_connect also blocks the usbmuxd_events_unsubscribe