diff options
Diffstat (limited to 'src/usocket.c')
| -rw-r--r-- | src/usocket.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/usocket.c b/src/usocket.c index ea0f172..617b1ea 100644 --- a/src/usocket.c +++ b/src/usocket.c | |||
| @@ -81,7 +81,6 @@ const char *sock_create(p_sock ps, int domain, int type, int protocol) | |||
| 81 | t_sock sock = socket(domain, type, protocol); | 81 | t_sock sock = socket(domain, type, protocol); |
| 82 | if (sock == SOCK_INVALID) return sock_createstrerror(errno); | 82 | if (sock == SOCK_INVALID) return sock_createstrerror(errno); |
| 83 | *ps = sock; | 83 | *ps = sock; |
| 84 | sock_setnonblocking(ps); | ||
| 85 | return NULL; | 84 | return NULL; |
| 86 | } | 85 | } |
| 87 | 86 | ||
| @@ -178,10 +177,7 @@ const char *sock_accept(p_sock ps, p_sock pa, SA *addr, | |||
| 178 | do *pa = accept(sock, addr, addr_len); | 177 | do *pa = accept(sock, addr, addr_len); |
| 179 | while (*pa < 0 && errno == EINTR); | 178 | while (*pa < 0 && errno == EINTR); |
| 180 | /* if result is valid, we are done */ | 179 | /* if result is valid, we are done */ |
| 181 | if (*pa != SOCK_INVALID) { | 180 | if (*pa != SOCK_INVALID) return NULL; |
| 182 | sock_setnonblocking(pa); | ||
| 183 | return NULL; | ||
| 184 | } | ||
| 185 | /* find out if we failed for a fatal reason */ | 181 | /* find out if we failed for a fatal reason */ |
| 186 | if (errno != EWOULDBLOCK && errno != ECONNABORTED) | 182 | if (errno != EWOULDBLOCK && errno != ECONNABORTED) |
| 187 | return sock_acceptstrerror(errno); | 183 | return sock_acceptstrerror(errno); |
