From a35f0649343f41bad5852d3fdca7deb69adb5f15 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 23 Jan 2017 18:02:05 +0200 Subject: [PATCH] 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. --- src/director/doveadm-connection.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.47.3