From 60cc83475397c4885d9fd10a7fb7ccda13a26e3e 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 15:46:42 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=A4=9A=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.c b/server.c index ae60c0b..a4d05d0 100644 --- a/server.c +++ b/server.c @@ -323,7 +323,7 @@ static int close_file_and_send(threadtimer_t *timer, char *data, size_t numbytes static int handle_accept(threadtimer_t* p) { int r = 1; printf("Recv data from client@%d\n", p->index); - if(send_data(my_fd(p), "Welcome to simple kanban server.", 33) <= 0) return 0; + if(!~((p)->status) && send_data(my_fd(p), "Welcome to simple kanban server.", 33) <= 0) return 0; while(((p)->numbytes = recv(my_fd(p), my_dat(p), TIMERDATSZ, MSG_DONTWAIT)) > 0) { touch_timer(p); my_dat(p)[(p)->numbytes] = 0;