Mercurial > dovecot > core-2.2
changeset 14290:7131eb54e9cf
aggregator: Fixed leaking connections to replicator.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 05 Mar 2012 13:18:28 +0200 |
parents | 32edf12d7624 |
children | 005bcb8d8d02 |
files | src/replication/aggregator/replicator-connection.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)