]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Create updates queue befroe periodic updates
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 6 Sep 2016 12:06:56 +0000 (13:06 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 6 Sep 2016 12:06:56 +0000 (13:06 +0100)
src/fuzzy_storage.c

index bdb5f4aa4048e602cd5664553df51eabea3b9e0f..feac6e11b1ad2c493846c4c195f10edcfde07bc3 100644 (file)
@@ -2236,7 +2236,6 @@ fuzzy_peer_rep (struct rspamd_worker *worker,
                                rspamd_fuzzy_peer_io, ctx);
                event_base_set (ctx->ev_base, &ctx->peer_ev);
                event_add (&ctx->peer_ev, NULL);
-               ctx->updates_pending = g_queue_new ();
        }
 }
 
@@ -2284,6 +2283,7 @@ start_fuzzy (struct rspamd_worker *worker)
        }
 
        if (worker->index == 0) {
+               ctx->updates_pending = g_queue_new ();
                rspamd_fuzzy_backend_start_update (ctx->backend, ctx->sync_timeout,
                                rspamd_fuzzy_storage_periodic_callback, ctx);
        }