Skip to content

Commit

Permalink
director: "doveadm director move" to same host now refreshes user's t…
Browse files Browse the repository at this point in the history
…imeout

This allows keeping user constantly in the same backend by just periodically
moving the user there.
  • Loading branch information
sirainen committed Jan 25, 2017
1 parent 29e8c5a commit 8839eaa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/director/doveadm-connection.c
Expand Up @@ -665,6 +665,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;
Expand Down

0 comments on commit 8839eaa

Please sign in to comment.