BUGFIX : Possible linked list bug
This commit is contained in:
parent
30ae45ec2b
commit
d200099244
5 changed files with 10 additions and 9 deletions
11
anet.c
11
anet.c
|
|
@ -282,18 +282,15 @@ static int anetGenericAccept(char *err, int s, struct sockaddr *sa, socklen_t *l
|
|||
while(1) {
|
||||
fd = accept(s,sa,len);
|
||||
if (fd == -1) {
|
||||
#ifdef _WIN32
|
||||
errno = WSAGetLastError();
|
||||
#endif
|
||||
if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) {
|
||||
|
||||
#ifndef _WIN32
|
||||
} else if (errno == EINTR) {
|
||||
if (errno == EINTR) {
|
||||
continue;
|
||||
#else
|
||||
errno = WSAGetLastError();
|
||||
if (errno == WSAEWOULDBLOCK) {
|
||||
#endif
|
||||
} else {
|
||||
anetSetError(err, "accept: %s", strerror(errno));
|
||||
return ANET_ERR;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue