mirror of
https://github.com/darkk/redsocks.git
synced 2025-08-26 03:35: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:
parent
af46180272
commit
c6c5cb93ce
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user