From 2d31558345964f65e98ef4f8d3146b8c041a8184 Mon Sep 17 00:00:00 2001 From: fumiama Date: Mon, 3 May 2021 20:33:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8F=E6=BC=8F=E6=B4=9E?= 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 c41ec58..2813982 100644 --- a/server.c +++ b/server.c @@ -271,7 +271,7 @@ void acceptTimer(void *p) { while(*timer->thread && !pthread_kill(*timer->thread, 0)) { sleep(MAXWAITSEC); puts("Check accept status"); - if(time(NULL) - timer->touch > MAXWAITSEC) { + if(*timer->thread && time(NULL) - timer->touch > MAXWAITSEC) { kill_thread(timer); } }