dovecot-2.1: aggregator: Fixed leaking connections to replicator.

dovecot at dovecot.org dovecot at dovecot.org
Mon Mar 5 13:18:33 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/7131eb54e9cf
changeset: 14254:7131eb54e9cf
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Mar 05 13:18:28 2012 +0200
description:
aggregator: Fixed leaking connections to replicator.

diffstat:

 src/replication/aggregator/replicator-connection.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (21 lines):

diff -r 32edf12d7624 -r 7131eb54e9cf src/replication/aggregator/replicator-connection.c
--- a/src/replication/aggregator/replicator-connection.c	Mon Mar 05 13:08:14 2012 +0200
+++ b/src/replication/aggregator/replicator-connection.c	Mon Mar 05 13:18:28 2012 +0200
@@ -137,6 +137,9 @@
 	unsigned int n;
 	int fd = -1;
 
+	if (conn->fd != -1)
+		return;
+
 	if (conn->port == 0) {
 		fd = net_connect_unix(conn->path);
 		if (fd == -1)
@@ -195,6 +198,7 @@
 	i_stream_destroy(&conn->input);
 	o_stream_destroy(&conn->output);
 	net_disconnect(conn->fd);
+	conn->fd = -1;
 }
 
 static struct replicator_connection *replicator_connection_create(void)


More information about the dovecot-cvs mailing list