From 1d780f287c03d924fbfbfea7f681f6d526a0ad37 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 10 Nov 2013 16:06:48 +0000 Subject: [PATCH] Terminate fuzzy worker with empty storage correctly. --- src/fuzzy_storage.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.39.5