]> source.dussan.org Git - rspamd.git/commitdiff
Terminate fuzzy worker with empty storage correctly.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 10 Nov 2013 16:06:48 +0000 (16:06 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 10 Nov 2013 16:06:48 +0000 (16:06 +0000)
src/fuzzy_storage.c

index c516faafe021160b88d0eac14bacb6f9b89a4aa5..1f47b0dde1e19cfdb9a08f8621500545c6e2c1c8 100644 (file)
@@ -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;
                }