aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/tcpclient.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tcpclient.c b/net/tcpclient.c
index d9b535d..bba25f1 100644
--- a/net/tcpclient.c
+++ b/net/tcpclient.c
@@ -367,8 +367,8 @@ static int tcpclient_send_buf(t_tcpclient *x, char *buf, int buf_len)
return 0;
}
x->x_nextthread++;
- if (x->x_nextthread > MAX_TCPCLIENT_THREADS) x->x_nextthread = 0;
- return buf_len;
+ if (x->x_nextthread >= MAX_TCPCLIENT_THREADS) x->x_nextthread = 0;
+ return max;
}
/* tcpclient_child_send runs in sendthread */