summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/socket.c2
-rw-r--r--tools/idevicedebugserverproxy.c11
2 files changed, 2 insertions, 11 deletions
diff --git a/common/socket.c b/common/socket.c
index 354e6a4..99a96b1 100644
--- a/common/socket.c
+++ b/common/socket.c
@@ -1084,8 +1084,6 @@ int socket_check_fd(int fd, fd_mode fdm, unsigned int timeout)
return -1;
}
} else if (sret == 0) {
- if (verbose >= 2)
- fprintf(stderr, "%s: timeout\n", __func__);
return -ETIMEDOUT;
}
} while (eagain);
diff --git a/tools/idevicedebugserverproxy.c b/tools/idevicedebugserverproxy.c
index 405a5a4..15e8deb 100644
--- a/tools/idevicedebugserverproxy.c
+++ b/tools/idevicedebugserverproxy.c
@@ -121,15 +121,8 @@ static void* connection_handler(void* data)
int dtimeout = 1;
while (!quit_flag) {
- fd_set read_fds = fds;
- struct timeval tv = { 0, 1000 };
- int ret_sel = select(client_fd+1, &read_fds, NULL, NULL, &tv);
- if (ret_sel < 0) {
- perror("select");
- break;
- }
- if (FD_ISSET(client_fd, &read_fds)) {
- ssize_t n = socket_receive(client_fd, buf, bufsize);
+ ssize_t n = socket_receive_timeout(client_fd, buf, bufsize, 0, 1);
+ if (n != -ETIMEDOUT) {
if (n < 0) {
fprintf(stderr, "Failed to read from client fd: %s\n", strerror(-n));
break;