From: Timo Sirainen Date: Mon, 23 Jan 2017 16:02:05 +0000 (+0200) Subject: director: "doveadm director move" to same host now refreshes user's timeout X-Git-Tag: 2.3.0.rc1~2269 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a35f0649343f41bad5852d3fdca7deb69adb5f15;p=thirdparty%2Fdovecot%2Fcore.git director: "doveadm director move" to same host now refreshes user's timeout This allows keeping user constantly in the same backend by just periodically moving the user there. --- diff --git a/src/director/doveadm-connection.c b/src/director/doveadm-connection.c index b99ad185fe..a30fa6a33f 100644 --- a/src/director/doveadm-connection.c +++ b/src/director/doveadm-connection.c @@ -676,6 +676,10 @@ doveadm_cmd_user_move(struct doveadm_connection *conn, const char *const *args) if (user == NULL || user->host != host) { director_move_user(conn->dir, conn->dir->self_host, NULL, username_hash, host); + } else { + /* already the correct host. reset the user's timeout. */ + user_directory_refresh(host->tag->users, user); + director_update_user(conn->dir, conn->dir->self_host, user); } o_stream_nsend(conn->output, "OK\n", 3); return 1;