iproxy: Fix (newly introduced) timeout errors not being handled
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 @@
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 @@
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 {