summaryrefslogtreecommitdiffstats
path: root/tools/iproxy.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-06-29 02:39:38 +0400
committerGravatar Nikias Bassen2019-06-29 02:39:38 +0400
commit6539b0261889bff41972338fa64cd230183fad42 (patch)
tree07962af8739716a0723504b6fc6710eaa8fb36a1 /tools/iproxy.c
parentaffc9af7f6dac1643a26409bfd50807ba88c4691 (diff)
downloadlibusbmuxd-6539b0261889bff41972338fa64cd230183fad42.tar.gz
libusbmuxd-6539b0261889bff41972338fa64cd230183fad42.tar.bz2
iproxy: Fix (newly introduced) timeout errors not being handled
Diffstat (limited to 'tools/iproxy.c')
-rw-r--r--tools/iproxy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/iproxy.c b/tools/iproxy.c
index 21dec51..113938e 100644
--- a/tools/iproxy.c
+++ b/tools/iproxy.c
@@ -67,7 +67,7 @@ static void *run_stoc_loop(void *arg)
while (!cdata->stop_stoc && cdata->fd > 0 && cdata->sfd > 0) {
recv_len = socket_receive_timeout(cdata->sfd, buffer, sizeof(buffer), 0, 5000);
if (recv_len <= 0) {
- if (recv_len == 0) {
+ if (recv_len == 0 || recv_len == -ETIMEDOUT) {
// try again
continue;
} else {
@@ -120,7 +120,7 @@ static void *run_ctos_loop(void *arg)
while (!cdata->stop_ctos && cdata->fd>0 && cdata->sfd>0) {
recv_len = socket_receive_timeout(cdata->fd, buffer, sizeof(buffer), 0, 5000);
if (recv_len <= 0) {
- if (recv_len == 0) {
+ if (recv_len == 0 || recv_len == -ETIMEDOUT) {
// try again
continue;
} else {