# HG changeset patch # User Timo Sirainen # Date 1510937598 -7200 # Node ID 4c0e2030200a818a73438ada9f32596f4f0f6697 # Parent 3d99067fb0b9cad7a4b0a444c84a68ab9273e04b 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. diff -r 3d99067fb0b9 -r 4c0e2030200a src/director/director-connection.c --- 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;