]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Mail cache: Don't warn if dotlocking fails due to timeout (non-dotlocking already...
authorTimo Sirainen <tss@iki.fi>
Thu, 11 Sep 2008 14:06:29 +0000 (17:06 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 11 Sep 2008 14:06:29 +0000 (17:06 +0300)
--HG--
branch : HEAD

src/lib-index/mail-cache.c

index d69a41823e1c5f0a33a62ef4fa562dab7c86e775..e7fdf585684ed5566f1e1add830d59abfc57dbe5 100644 (file)
@@ -478,12 +478,15 @@ static int mail_cache_lock_file(struct mail_cache *cache, bool nonblock)
                ret = file_dotlock_create(&cache->dotlock_settings,
                                          cache->filepath, flags,
                                          &cache->dotlock);
-               if (ret <= 0) {
+               if (ret < 0) {
                        mail_cache_set_syscall_error(cache,
                                                     "file_dotlock_create()");
                }
        }
 
+       /* don't bother warning if locking failed due to a timeout. since cache
+          updating isn't all that important we're using a very short timeout
+          so it can be triggered sometimes on heavy load */
        if (ret <= 0)
                return ret;