mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-23 09:20:23 +02:00
More adjustments/bugfixes.
This commit is contained in:
@ -88,7 +88,6 @@ const char *sock_create(p_sock ps, int domain, int type, int protocol)
|
||||
if (sock == SOCK_INVALID)
|
||||
return sock_createstrerror(WSAGetLastError());
|
||||
*ps = sock;
|
||||
sock_setnonblocking(ps);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -177,10 +176,7 @@ 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) {
|
||||
sock_setnonblocking(pa);
|
||||
return NULL;
|
||||
}
|
||||
if (*pa != SOCK_INVALID) return NULL;
|
||||
/* optimization */
|
||||
if (timeout == 0) return io_strerror(IO_TIMEOUT);
|
||||
/* otherwise find out why we failed */
|
||||
|
Reference in New Issue
Block a user