Don't fd_set_nonblock(-1)
This commit is contained in:
@@ -282,8 +282,11 @@ static int sk_accept (int fd)
|
|||||||
|
|
||||||
int ret = accept(fd, (struct sockaddr *)&addr, &addr_size);
|
int ret = accept(fd, (struct sockaddr *)&addr, &addr_size);
|
||||||
|
|
||||||
if (ret==-1 && errno!=EINTR)
|
if (ret==-1) {
|
||||||
perror("accept");
|
if (errno!=EINTR)
|
||||||
|
perror("accept");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
fd_set_nonblock(ret);
|
fd_set_nonblock(ret);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user