]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Another try to fix corruption during maps reload
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Jan 2017 17:33:53 +0000 (17:33 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Jan 2017 17:33:53 +0000 (17:33 +0000)
src/libutil/map.c

index ea295e7a4333c15c04af3c306cf8102b743f1369..6a1e76fcdf41f9382a1caef66e8b3472235a5f91 100644 (file)
@@ -294,9 +294,16 @@ free_http_cbdata_dtor (gpointer p)
        struct rspamd_map *map;
 
        map = cbd->map;
-       cbd->stage = map_finished;
+       if (cbd->stage >= map_load_file) {
+               REF_RELEASE (cbd);
+       }
+       else {
+               /* We cannot terminate DNS requests sent */
+               cbd->stage = map_finished;
+       }
+
        msg_warn_map ("connection with http server is terminated: worker is stopping");
-       REF_RELEASE (cbd);
+
 }
 
 /*