Mercurial > dovecot > core-2.2
changeset 15706:e9e6a95cea21
replicator: Don't try to reuse doveadm connections (and have them immediately fail)
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 31 Jan 2013 22:14:12 +0200 |
parents | 0a5a19067d95 |
children | 07ee9842a00b |
files | src/replication/replicator/doveadm-connection.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/replication/replicator/doveadm-connection.c Thu Jan 31 22:13:36 2013 +0200 +++ b/src/replication/replicator/doveadm-connection.c Thu Jan 31 22:14:12 2013 +0200 @@ -57,7 +57,13 @@ conn->callback = NULL; conn->context = NULL; + + /* make sure callback doesn't try to reuse this connection, since + we can't currently handle it */ + i_assert(!conn->cmd_sent); + conn->cmd_sent = TRUE; callback(reply, state, context); + conn->cmd_sent = FALSE; } static void doveadm_close(struct doveadm_connection *conn)