Mercurial > dovecot > core-2.2
diff src/director/user-directory.h @ 22673:867c3905ac0b
director: Avoid USER loops when ring latency is over 1 second
Do this by adding a timestamp parameter to USER events. This way if it
takes over 1 second for the USER event to traverse the ring, it won't get
into an infinite loop getting the user updated over and over again.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Sun, 26 Nov 2017 01:19:35 +0200 |
parents | 6d37f4dd198d |
children | c9549bea9106 |
line wrap: on
line diff
--- a/src/director/user-directory.h Sun Nov 26 01:14:01 2017 +0200 +++ b/src/director/user-directory.h Sun Nov 26 01:19:35 2017 +0200 @@ -5,7 +5,9 @@ ((user)->kill_ctx != NULL) struct user { - /* sorted by time */ + /* Approximately sorted by time (except during handshaking). + The sorting order may be constantly wrong a few seconds here and + there. */ struct user *prev, *next; /* first 32 bits of MD5(username). collisions are quite unlikely, but