From: Timo Sirainen Date: Sun, 5 Nov 2017 21:11:25 +0000 (+0200) Subject: director: Fix off-by-one when checking if user weakness is stuck X-Git-Tag: 2.2.34~257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2786a96b7d8082a44533959fe27165e5a6683610;p=thirdparty%2Fdovecot%2Fcore.git 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. --- diff --git a/src/director/user-directory.c b/src/director/user-directory.c index ea51030771..4e064d46f6 100644 --- a/src/director/user-directory.c +++ b/src/director/user-directory.c @@ -82,7 +82,7 @@ static bool user_directory_user_has_connections(struct user_directory *dir, } 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;