|
When using ideviceinstaller, np_client_free() would block for several
minutes when ideviceinstaller cleans up after installing the
application.
This happens because the function is blocking on thread_join(), waiting
for the notification watcher thread to finish. It only ends when
np_get_notification() returns a negative value after getting a timeout,
which takes several minutes.
However, the thread loop will also exit early if client->parent gets
NULL (the loop is iterated every 500ms), so this commit ensures
client->parent gets set to NULL early in np_client_free() so that
thread_join() does not block for a long time.
Signed-off-by: Martin Szulecki <m.szulecki@libimobiledevice.org>
|