From: Vsevolod Stakhov Date: Sun, 10 Nov 2013 16:06:48 +0000 (+0000) Subject: Terminate fuzzy worker with empty storage correctly. X-Git-Tag: 0.6.0~79 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1d780f287c03d924fbfbfea7f681f6d526a0ad37;p=rspamd.git Terminate fuzzy worker with empty storage correctly. --- 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; }