Mercurial > dovecot > core-2.2
changeset 22669:4c0e2030200a
director: Make sure users are sorted after unfinished handshake
The users were sorted after the handshake was finished, but if the
connection was closed before that hapepned, the users were left
unsorted. This could have caused the users to not expire early
enough.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 17 Nov 2017 18:53:18 +0200 |
parents | 3d99067fb0b9 |
children | a96fa917ced1 |
files | src/director/director-connection.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/director/director-connection.c Fri Nov 17 14:56:20 2017 +0200 +++ b/src/director/director-connection.c Fri Nov 17 18:53:18 2017 +0200 @@ -2241,6 +2241,12 @@ if (dir->right == conn) dir->right = NULL; + if (conn->users_unsorted) { + /* Users were received, but handshake didn't finish. + Finish sorting so the users won't stay in wrong order. */ + mail_hosts_sort_users(conn->dir->mail_hosts); + } + if (conn->connect_request_to != NULL) { director_host_unref(conn->connect_request_to); conn->connect_request_to = NULL;