From 4aae8acbcfa9cac96b4af39bfabcbe569e804827 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 11 Sep 2008 17:06:29 +0300 Subject: [PATCH] Mail cache: Don't warn if dotlocking fails due to timeout (non-dotlocking already didn't). --HG-- branch : HEAD --- src/lib-index/mail-cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib-index/mail-cache.c b/src/lib-index/mail-cache.c index d69a41823e..e7fdf58568 100644 --- a/src/lib-index/mail-cache.c +++ b/src/lib-index/mail-cache.c @@ -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; -- 2.47.3