dovecot-1.2: rawlog: Make sure to set fds nonblocking to avoid h...

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 30 20:54:22 EET 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/b7ed70a0192b
changeset: 9461:b7ed70a0192b
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 30 14:54:18 2009 -0400
description:
rawlog: Make sure to set fds nonblocking to avoid hangs.

diffstat:

1 file changed, 4 insertions(+)
src/util/rawlog.c |    4 ++++

diffs (21 lines):

diff -r a0d72e0d88dd -r b7ed70a0192b src/util/rawlog.c
--- a/src/util/rawlog.c	Thu Oct 29 17:40:33 2009 -0400
+++ b/src/util/rawlog.c	Fri Oct 30 14:54:18 2009 -0400
@@ -3,6 +3,7 @@
 #include "lib.h"
 
 #include "ioloop.h"
+#include "fd-set-nonblock.h"
 #include "network.h"
 #include "write-full.h"
 #include "istream.h"
@@ -263,6 +264,9 @@ rawlog_proxy_create(int client_in_fd, in
 	proxy->client_io = io_add(proxy->client_in_fd, IO_READ,
 				  client_input, proxy);
 	o_stream_set_flush_callback(proxy->client_output, client_output, proxy);
+
+	fd_set_nonblock(client_in_fd, TRUE);
+	fd_set_nonblock(client_out_fd, TRUE);
 
 	proxy->last_out_lf = TRUE;
 	proxy->flags = flags;


More information about the dovecot-cvs mailing list