]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
director: Fix off-by-one when checking if user weakness is stuck
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 5 Nov 2017 21:11:25 +0000 (23:11 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 7 Nov 2017 19:17:10 +0000 (21:17 +0200)
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.

src/director/user-directory.c

index ea510307714bb672f102b82b2474c04a9d8a5f4a..4e064d46f6712b39c51d7df48c814b255b9e9c93 100644 (file)
@@ -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;