diff --git a/redsocks.c b/redsocks.c index 0c038eca..3a869dff 100644 --- a/redsocks.c +++ b/redsocks.c @@ -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;