diff options
Diffstat (limited to 'src/wsocket.c')
-rw-r--r-- | src/wsocket.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wsocket.c b/src/wsocket.c index 08c1046..84a49dc 100644 --- a/src/wsocket.c +++ b/src/wsocket.c | |||
@@ -177,7 +177,10 @@ const char *sock_accept(p_sock ps, p_sock pa, SA *addr, | |||
177 | /* try to get client socket */ | 177 | /* try to get client socket */ |
178 | *pa = accept(sock, addr, addr_len); | 178 | *pa = accept(sock, addr, addr_len); |
179 | /* if return is valid, we are done */ | 179 | /* if return is valid, we are done */ |
180 | if (*pa != SOCK_INVALID) return NULL; | 180 | if (*pa != SOCK_INVALID) { |
181 | sock_setnonblocking(pa); | ||
182 | return NULL; | ||
183 | } | ||
181 | /* optimization */ | 184 | /* optimization */ |
182 | if (timeout == 0) return io_strerror(IO_TIMEOUT); | 185 | if (timeout == 0) return io_strerror(IO_TIMEOUT); |
183 | /* otherwise find out why we failed */ | 186 | /* otherwise find out why we failed */ |