]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm director ring remove: Wait ring sync before and after removal
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 14 Sep 2017 08:57:27 +0000 (11:57 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 14 Sep 2017 10:39:56 +0000 (13:39 +0300)
This helps mainly with automated tests.

src/director/director.c
src/director/doveadm-connection.c

index a03f3b98e6faf750593062fe0b1b0e192b6324ac..a1329fa408afcb981f21fd79f67433b788ec71a1 100644 (file)
@@ -545,6 +545,7 @@ void director_ring_remove(struct director_host *removed_host,
                              removed_host->port);
        director_update_send_version(dir, src,
                                     DIRECTOR_VERSION_RING_REMOVE, cmd);
+       director_sync(dir);
 }
 
 static void
index 3ab8a3eca0e54c3ae37c04f4e8b86a5e3ace0563..9485c18acd1407623fcd85c0c3d2c1c53d317a34 100644 (file)
@@ -289,7 +289,7 @@ doveadm_cmd_director_remove(struct doveadm_connection *conn,
                director_ring_remove(host, conn->dir->self_host);
                o_stream_nsend(conn->output, "OK\n", 3);
        }
-       return DOVEADM_DIRECTOR_CMD_RET_OK;
+       return DOVEADM_DIRECTOR_CMD_RET_RING_SYNC_OK;
 }
 
 static enum doveadm_director_cmd_ret