summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-10-10 21:51:48 +0200
committerGravatar Nikias Bassen2014-10-10 21:51:48 +0200
commit471b2261e73c5a65049a5c842369ec3de613850c (patch)
tree95132655ed1e1d0f24dc08266deee8704166b40b
parent8152b60564a557a009a76912f5e566c27fe9a3f2 (diff)
downloadlibusbmuxd-471b2261e73c5a65049a5c842369ec3de613850c.tar.gz
libusbmuxd-471b2261e73c5a65049a5c842369ec3de613850c.tar.bz2
Fix check for file descriptor validity
-rw-r--r--src/libusbmuxd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index a72b259..d38d850 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -516,7 +516,7 @@ static int usbmuxd_listen_poll()
sfd = connect_usbmuxd_socket();
if (sfd < 0) {
while (event_cb) {
- if ((sfd = connect_usbmuxd_socket()) > 0) {
+ if ((sfd = connect_usbmuxd_socket()) >= 0) {
break;
}
sleep(1);