mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-06-26 05:40:29 +08:00
fox
This commit is contained in:
6
server.c
6
server.c
@@ -351,12 +351,12 @@ static int handle_accept(threadtimer_t* p) {
|
|||||||
}
|
}
|
||||||
if((p)->numbytes <= 0) {
|
if((p)->numbytes <= 0) {
|
||||||
perror("recv");
|
perror("recv");
|
||||||
if(errno == EAGAIN) {
|
if(errno == EAGAIN || errno == EINVAL) {
|
||||||
if(!++(p)->again_cnt) {
|
if(!++(p)->again_cnt) {
|
||||||
r = 0;
|
r = 0;
|
||||||
puts("Max EAGAIN cnt exceeded");
|
puts("Max EAGAIN/EINVAL cnt exceeded");
|
||||||
}
|
}
|
||||||
} else if(errno != EINVAL) r = 0;
|
} else r = 0;
|
||||||
}
|
}
|
||||||
printf("Recv finished, continune: %s\n", r?"true":"false");
|
printf("Recv finished, continune: %s\n", r?"true":"false");
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
Reference in New Issue
Block a user