diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-13 13:58:09 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-13 13:58:09 +0000 |
commit | 684996ee80c4b834f10c764a71a7f22dd2f23f83 (patch) | |
tree | 54ebf01447ac6fa4e693d00a952cda580884fd16 /contrib/librdns/resolver.c | |
parent | 54e835fc3540cc4dae025976fd15a0ad9cf10833 (diff) | |
download | rspamd-684996ee80c4b834f10c764a71a7f22dd2f23f83.tar.gz rspamd-684996ee80c4b834f10c764a71a7f22dd2f23f83.zip |
[Minor] Add failure reason in the upstreams code
Diffstat (limited to 'contrib/librdns/resolver.c')
-rw-r--r-- | contrib/librdns/resolver.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/librdns/resolver.c b/contrib/librdns/resolver.c index 6c4f29d8c..9c214c21e 100644 --- a/contrib/librdns/resolver.c +++ b/contrib/librdns/resolver.c @@ -334,7 +334,7 @@ rdns_process_timer (void *arg) if (req->resolver->ups && req->io->srv->ups_elt) { req->resolver->ups->fail (req->io->srv->ups_elt, - req->resolver->ups->data); + req->resolver->ups->data, "timeout waiting reply"); } else { UPSTREAM_FAIL (req->io->srv, time (NULL)); @@ -427,7 +427,7 @@ rdns_process_timer (void *arg) else if (r == -1) { if (req->resolver->ups && req->io->srv->ups_elt) { req->resolver->ups->fail (req->io->srv->ups_elt, - req->resolver->ups->data); + req->resolver->ups->data, "cannot send retransmit after timeout"); } else { UPSTREAM_FAIL (req->io->srv, time (NULL)); @@ -537,7 +537,7 @@ rdns_process_retransmit (int fd, void *arg) else if (r == -1) { if (req->resolver->ups && req->io->srv->ups_elt) { req->resolver->ups->fail (req->io->srv->ups_elt, - req->resolver->ups->data); + req->resolver->ups->data, "retransmit send failed"); } else { UPSTREAM_FAIL (req->io->srv, time (NULL)); @@ -790,7 +790,8 @@ rdns_make_request_full ( REF_RELEASE (req); if (resolver->ups && serv->ups_elt) { - resolver->ups->fail (serv->ups_elt, resolver->ups->data); + resolver->ups->fail (serv->ups_elt, resolver->ups->data, + "send IO error"); } else { UPSTREAM_FAIL (serv, time (NULL)); |