}
lua_settop (L, top);
-
TCP_RELEASE (cbd);
callback_called = TRUE;
}
va_end (ap);
-
lua_thread_pool_restore_callback (&cbs);
}
const struct rdns_request_name *rn;
if (reply->code != RDNS_RC_NOERROR) {
+ TCP_RETAIN (cbd);
rn = rdns_request_get_name (reply->request, NULL);
lua_tcp_push_error (cbd, TRUE, "unable to resolve host: %s",
rn->name);
rspamd_inet_address_set_port (cbd->addr, cbd->port);
if (!lua_tcp_make_connection (cbd)) {
+ TCP_RETAIN (cbd);
lua_tcp_push_error (cbd, TRUE, "unable to make connection to the host %s",
rspamd_inet_address_to_string (cbd->addr));
TCP_RELEASE (cbd);
if (!rspamd_dns_resolver_request_task (task, lua_tcp_dns_handler, cbd,
RDNS_REQUEST_A, host)) {
+ cbd->item = NULL; /* We have not registered watcher */
lua_pushboolean (L, FALSE);
lua_pushliteral (L, "Failed to initiate dns request");
TCP_RELEASE (cbd);