aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuzzy_storage.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-10 16:06:48 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-11-10 16:06:48 +0000
commit1d780f287c03d924fbfbfea7f681f6d526a0ad37 (patch)
tree8ab5adab9a7952d0e6f02eaf286fa931a084c1a5 /src/fuzzy_storage.c
parent1235838bdcc376953df267f6ec09d349d351d110 (diff)
downloadrspamd-1d780f287c03d924fbfbfea7f681f6d526a0ad37.tar.gz
rspamd-1d780f287c03d924fbfbfea7f681f6d526a0ad37.zip
Terminate fuzzy worker with empty storage correctly.
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r--src/fuzzy_storage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index c516faafe..1f47b0dde 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -239,6 +239,9 @@ sync_cache (gpointer ud)
filename = ctx->hashfile;
if (filename == NULL ) {
rspamd_mutex_unlock (ctx->update_mtx);
+ if (wanna_die) {
+ return NULL;
+ }
continue;
}
expire = ctx->expire;
@@ -248,6 +251,9 @@ sync_cache (gpointer ud)
msg_err(
"cannot create hash file %s: %s", filename, strerror (errno));
rspamd_mutex_unlock (ctx->update_mtx);
+ if (wanna_die) {
+ return NULL;
+ }
continue;
}