1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-06-05 00:10:29 +08:00
This commit is contained in:
源文雨
2022-11-25 13:04:44 +08:00
parent 8a1f257852
commit 277226c65d

View File

@@ -355,13 +355,15 @@ static int handle_accept(threadtimer_t* p) {
break;
}
if((p)->numbytes <= 0) {
perror("recv");
if(errno == EAGAIN || errno == EINVAL) {
if(!++(p)->again_cnt) {
r = 0;
puts("Max EAGAIN/EINVAL cnt exceeded");
}
} else r = 0;
} else if(errno) {
perror("recv");
r = 0;
}
}
printf("Recv finished, remain: %zd, continue: %s\n", (p)->numbytes, r?"true":"false");
return r;