]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: file-dotlock - Do not call callback if we are going to timeout
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 20 Aug 2020 09:46:06 +0000 (12:46 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 11 Sep 2020 07:07:20 +0000 (07:07 +0000)
src/lib/file-dotlock.c

index b3e9d29b7fb224f41e1c3fb023135f2a6f7b1596..ad14ef0ff01ba9e6886602cf68ec7a591cc8984c 100644 (file)
@@ -539,7 +539,8 @@ dotlock_create(struct dotlock *dotlock, enum dotlock_create_flags flags,
                        }
                }
 
-               if (last_notify != now && set->callback != NULL) {
+               if (last_notify != now && set->callback != NULL &&
+                   now < max_wait_time) {
                        last_notify = now;
                        change_secs = now - lock_info.last_change;
                        wait_left = max_wait_time - now;