summaryrefslogtreecommitdiffstats
path: root/src/libusbmuxd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libusbmuxd.c')
-rw-r--r--src/libusbmuxd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index 2897da6..485857b 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -813,7 +813,10 @@ USBMUXD_API int usbmuxd_unsubscribe()
#ifdef WIN32
if (devmon != NULL) {
- WaitForSingleObject(devmon, INFINITE);
+ res = WaitForSingleObject(devmon, INFINITE);
+ if (res != 0) {
+ return res;
+ }
}
#else
res = pthread_kill(devmon, 0);