Mercurial > dovecot > core-2.2
diff src/director/doveadm-connection.c @ 21443:2b9164c4299a
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.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 23 Jan 2017 18:02:05 +0200 |
parents | 14e13ad7efde |
children | 86e52ff70044 |
line wrap: on
line diff
--- a/src/director/doveadm-connection.c Mon Jan 16 14:01:57 2017 +0200 +++ b/src/director/doveadm-connection.c Mon Jan 23 18:02:05 2017 +0200 @@ -665,6 +665,10 @@ 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;