Fixing bugs...
This commit is contained in:
parent
5dc5c3ebe8
commit
f7579db9e8
24 changed files with 127 additions and 94 deletions
|
@ -177,7 +177,10 @@ const char *sock_accept(p_sock ps, p_sock pa, SA *addr,
|
|||
/* try to get client socket */
|
||||
*pa = accept(sock, addr, addr_len);
|
||||
/* if return is valid, we are done */
|
||||
if (*pa != SOCK_INVALID) return NULL;
|
||||
if (*pa != SOCK_INVALID) {
|
||||
sock_setnonblocking(pa);
|
||||
return NULL;
|
||||
}
|
||||
/* optimization */
|
||||
if (timeout == 0) return io_strerror(IO_TIMEOUT);
|
||||
/* otherwise find out why we failed */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue