summaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/map.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c
index ea295e7a4..6a1e76fcd 100644
--- a/src/libutil/map.c
+++ b/src/libutil/map.c
@@ -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);
+
}
/*