From: Timo Sirainen Date: Thu, 31 Jan 2013 20:14:12 +0000 (+0200) Subject: replicator: Don't try to reuse doveadm connections (and have them immediately fail) X-Git-Tag: 2.2.beta2~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea664cc5ad8a2c2bcbb363f09b56e39cd2d2a82f;p=thirdparty%2Fdovecot%2Fcore.git replicator: Don't try to reuse doveadm connections (and have them immediately fail) --- diff --git a/src/replication/replicator/doveadm-connection.c b/src/replication/replicator/doveadm-connection.c index 1aabbb4d53..56f3dd16fd 100644 --- a/src/replication/replicator/doveadm-connection.c +++ b/src/replication/replicator/doveadm-connection.c @@ -57,7 +57,13 @@ static void doveadm_callback(struct doveadm_connection *conn, 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)