rep = memory_pool_alloc0 (req->pool, sizeof (struct rspamd_dns_reply));
rep->request = req;
rep->code = DNS_RC_SERVFAIL;
- req->func (rep, req->arg);
upstream_fail (&rep->request->server->up, rep->request->time);
remove_normal_event (req->session, dns_fin_cb, req);
+ req->func (rep, req->arg);
return;
}
/* Select other server */
rep = memory_pool_alloc0 (req->pool, sizeof (struct rspamd_dns_reply));
rep->request = req;
rep->code = DNS_RC_SERVFAIL;
- req->func (rep, req->arg);
remove_normal_event (req->session, dns_fin_cb, req);
+ req->func (rep, req->arg);
return;
}
rep = memory_pool_alloc0 (req->pool, sizeof (struct rspamd_dns_reply));
rep->request = req;
rep->code = DNS_RC_SERVFAIL;
- req->func (rep, req->arg);
upstream_fail (&rep->request->server->up, rep->request->time);
remove_normal_event (req->session, dns_fin_cb, req);
+ req->func (rep, req->arg);
+
return;
}
/* Add other retransmit event */
rep = memory_pool_alloc0 (req->pool, sizeof (struct rspamd_dns_reply));
rep->request = req;
rep->code = DNS_RC_SERVFAIL;
- req->func (rep, req->arg);
remove_normal_event (req->session, dns_fin_cb, req);
upstream_fail (&rep->request->server->up, rep->request->time);
+ req->func (rep, req->arg);
+
}
}
rep = memory_pool_alloc0 (req->pool, sizeof (struct rspamd_dns_reply));
rep->request = req;
rep->code = DNS_RC_SERVFAIL;
- req->func (rep, req->arg);
upstream_fail (&rep->request->server->up, rep->request->time);
+ req->func (rep, req->arg);
+
return;
}
r = send_dns_request (req);
rep = memory_pool_alloc0 (req->pool, sizeof (struct rspamd_dns_reply));
rep->request = req;
rep->code = DNS_RC_SERVFAIL;
- req->func (rep, req->arg);
upstream_fail (&rep->request->server->up, rep->request->time);
+ req->func (rep, req->arg);
+
}
else if (r == 1) {
/* Add timer event */