mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-06-30 08:00:27 +08:00
fix
This commit is contained in:
6
server.c
6
server.c
@@ -355,13 +355,15 @@ static int handle_accept(threadtimer_t* p) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if((p)->numbytes <= 0) {
|
if((p)->numbytes <= 0) {
|
||||||
perror("recv");
|
|
||||||
if(errno == EAGAIN || errno == EINVAL) {
|
if(errno == EAGAIN || errno == EINVAL) {
|
||||||
if(!++(p)->again_cnt) {
|
if(!++(p)->again_cnt) {
|
||||||
r = 0;
|
r = 0;
|
||||||
puts("Max EAGAIN/EINVAL cnt exceeded");
|
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");
|
printf("Recv finished, remain: %zd, continue: %s\n", (p)->numbytes, r?"true":"false");
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
Reference in New Issue
Block a user