]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: server: Make sure provided connection FDs are non-blocking.
authorStephan Bosch <stephan@dovecot.fi>
Sun, 19 Jun 2016 23:20:33 +0000 (01:20 +0200)
committerStephan Bosch <stephan@dovecot.fi>
Mon, 20 Jun 2016 00:31:22 +0000 (02:31 +0200)
src/lib-http/http-server-connection.c

index 2636b9e46a94e003bee37c11fd477498d0ac8612..553936094b9a06ee078777b8819fe3dea67a8f23 100644 (file)
@@ -1055,6 +1055,9 @@ http_server_connection_create(struct http_server *server,
        conn->callbacks = callbacks;
        conn->context = context;
 
+       net_set_nonblock(fd_in, TRUE);
+       if (fd_in != fd_out)
+               net_set_nonblock(fd_out, TRUE);
        (void)net_set_tcp_nodelay(fd_out, TRUE);
 
        /* get a name for this connection */