diff options
| author | 2019-06-29 02:39:38 +0400 | |
|---|---|---|
| committer | 2019-06-29 02:39:38 +0400 | |
| commit | 6539b0261889bff41972338fa64cd230183fad42 (patch) | |
| tree | 07962af8739716a0723504b6fc6710eaa8fb36a1 | |
| parent | affc9af7f6dac1643a26409bfd50807ba88c4691 (diff) | |
| download | libusbmuxd-6539b0261889bff41972338fa64cd230183fad42.tar.gz libusbmuxd-6539b0261889bff41972338fa64cd230183fad42.tar.bz2 | |
iproxy: Fix (newly introduced) timeout errors not being handled
| -rw-r--r-- | tools/iproxy.c | 4 | 
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 { | 
