From 81dedbcbac24e9be2a6f5446ccb133851396246c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Wed, 26 Oct 2022 16:19:57 +0800 Subject: [PATCH] fix recv loop --- server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.c b/server.c index 81364ff..1eaf5c8 100644 --- a/server.c +++ b/server.c @@ -343,7 +343,7 @@ static int handle_accept(threadtimer_t* p) { if(!(r = check_buffer((p)))) break; } printf("Recv finished, continune: %s\n", r?"true":"false"); - return r; + return r && (p)->numbytes > 0; } static void handle_int(int signo) {