Skip to content

Commit

Permalink
director: Don't crash on doveadm director ring remove for unknown dir…
Browse files Browse the repository at this point in the history
…ector

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)
  • Loading branch information
sirainen authored and cmouse committed Oct 5, 2017
1 parent 3122132 commit 5c34019
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/director/doveadm-connection.c
Expand Up @@ -284,11 +284,13 @@ doveadm_cmd_director_remove(struct doveadm_connection *conn,
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
Expand Down

0 comments on commit 5c34019

Please sign in to comment.