summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-06-13 00:56:32 +0200
committerGravatar Nikias Bassen2019-06-13 00:56:32 +0200
commit6edc36fccb52a963c9ebfbb44ba7b91570e0fd06 (patch)
treed2a45e5a0e245b22b5a732b8dacd7b8ef29a69fa /common
parent97f8ac9e9ad9ee73ca635a26831bfe950a5d673b (diff)
downloadlibimobiledevice-6edc36fccb52a963c9ebfbb44ba7b91570e0fd06.tar.gz
libimobiledevice-6edc36fccb52a963c9ebfbb44ba7b91570e0fd06.tar.bz2
socket: Return -ETIMEDOUT when select() in socket_read_fd() reached the timeout
Diffstat (limited to 'common')
-rw-r--r--common/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/socket.c b/common/socket.c
index aa97848..0ee8105 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -412,6 +412,10 @@ int socket_check_fd(int fd, fd_mode fdm, unsigned int timeout)
strerror(errno));
return -1;
}
+ } else if (sret == 0) {
+ if (verbose >= 2)
+ fprintf(stderr, "%s: timeout\n", __func__);
+ return -ETIMEDOUT;
}
} while (eagain);