Mercurial > dovecot > core-2.2
changeset 20369:5b16f43fcb3b
lib-http: server: Make sure provided connection FDs are non-blocking.
author | Stephan Bosch <stephan@dovecot.fi> |
---|---|
date | Mon, 20 Jun 2016 01:20:33 +0200 |
parents | 2612cf4fff44 |
children | 142b1aac8bea |
files | src/lib-http/http-server-connection.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-http/http-server-connection.c Mon Jun 20 01:15:18 2016 +0200 +++ b/src/lib-http/http-server-connection.c Mon Jun 20 01:20:33 2016 +0200 @@ -1025,6 +1025,10 @@ conn->callbacks = callbacks; conn->context = context; + net_set_nonblock(fd_in, TRUE); + if (fd_in != fd_out) + net_set_nonblock(fd_out, TRUE); + /* get a name for this connection */ if (fd_in != fd_out || net_getpeername(fd_in, &addr, &port) < 0) { name = t_strdup_printf("[%u]", id);