changeset 22632:fd12e91c6718

director: Fix off-by-one when checking if user weakness is stuck When the weakness was exactly at the second, the weakness wasn't detected and the next expiration timeout was removed entirely. This shouldn't have caused any bigger problems, because another user lookup on the following second would have then detected the weakness, removed the user and restored the next expiration timeout.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Sun, 05 Nov 2017 23:11:25 +0200
parents 53082f1df8a6
children 9284bdc3c5c5
files src/director/user-directory.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/director/user-directory.c	Thu Oct 26 13:56:25 2017 +0300
+++ b/src/director/user-directory.c	Sun Nov 05 23:11:25 2017 +0200
@@ -82,7 +82,7 @@
 	}
 
 	if (user->weak) {
-		if (expire_timestamp + USER_NEAR_EXPIRING_MAX >= ioloop_time) {
+		if (expire_timestamp + USER_NEAR_EXPIRING_MAX > ioloop_time) {
 			*retry_secs_r = expire_timestamp +
 				USER_NEAR_EXPIRING_MAX - ioloop_time;
 			return TRUE;