0
0
mirror of https://github.com/darkk/redsocks.git synced 2025-08-26 11:45:30 +00:00

Mark client socket non-blocking

Avoiding to do so caused splice() to block during write.

AFAIK, it does not affect bufferevent pump, but I may be wrong.
This commit is contained in:
Leonid Evdokimov 2016-04-03 18:06:16 +03:00
parent af46180272
commit c6c5cb93ce

View File

@ -1106,6 +1106,12 @@ static void redsocks_accept_client(int fd, short what, void *_arg)
goto fail;
}
error = fcntl_nonblock(client_fd);
if (error) {
log_errno(LOG_ERR, "fcntl");
goto fail;
}
if (apply_tcp_keepalive(client_fd))
goto fail;