Mercurial > dovecot > core-2.2
changeset 22571:4057b92ed502
director: Don't crash on doveadm director ring remove for unknown director
Ring syncing isn't started, so it shouldn't try to wait for ring sync.
Fixes:
Panic: file doveadm-connection.c: line 859 (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && conn->dir->left == NULL)
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Thu, 05 Oct 2017 11:49:31 +0300 |
parents | 39b2dd549e8a |
children | 4a0792a03f5a |
files | src/director/doveadm-connection.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/director/doveadm-connection.c Thu Oct 05 11:46:55 2017 +0300 +++ b/src/director/doveadm-connection.c Thu Oct 05 11:49:31 2017 +0300 @@ -285,11 +285,13 @@ host = port != 0 ? director_host_lookup(conn->dir, &ip, port) : director_host_lookup_ip(conn->dir, &ip); - if (host == NULL) + if (host == NULL) { o_stream_nsend_str(conn->output, "NOTFOUND\n"); - else + return DOVEADM_DIRECTOR_CMD_RET_OK; + } else { director_ring_remove(host, conn->dir->self_host); - return DOVEADM_DIRECTOR_CMD_RET_RING_SYNC_OK; + return DOVEADM_DIRECTOR_CMD_RET_RING_SYNC_OK; + } } static enum doveadm_director_cmd_ret