mirror of https://github.com/getdnsapi/getdns.git
Don't retry an already tried upstream
This commit is contained in:
parent
8797280429
commit
b178f94505
|
@ -201,6 +201,7 @@ network_req_init(getdns_network_req *net_req, getdns_dns_req *owner,
|
|||
|
||||
/* state variables from the resolver, don't touch
|
||||
*/
|
||||
net_req->first_upstream = NULL;
|
||||
net_req->upstream = NULL;
|
||||
net_req->fd = -1;
|
||||
net_req->transport_current = 0;
|
||||
|
|
|
@ -2296,8 +2296,13 @@ upstream_find_for_netreq(getdns_network_req *netreq)
|
|||
return STUB_TRY_AGAIN_LATER;
|
||||
return -1;
|
||||
}
|
||||
if (upstream == netreq->first_upstream)
|
||||
continue;
|
||||
|
||||
netreq->transport_current = i;
|
||||
netreq->upstream = upstream;
|
||||
if (!netreq->first_upstream)
|
||||
netreq->first_upstream = upstream;
|
||||
netreq->keepalive_sent = 0;
|
||||
|
||||
DEBUG_STUB("%s %-35s: MSG: %p found upstream %p with transport %d, fd: %d\n", STUB_DEBUG_SCHEDULE, __FUNC__, (void*)netreq, (void *)upstream, (int)netreq->transports[i], fd);
|
||||
|
|
|
@ -221,6 +221,7 @@ typedef struct getdns_network_req
|
|||
getdns_redirects_t follow_redirects;
|
||||
|
||||
/* For stub resolving */
|
||||
struct getdns_upstream *first_upstream;
|
||||
struct getdns_upstream *upstream;
|
||||
int fd;
|
||||
getdns_transport_list_t transports[GETDNS_TRANSPORTS_MAX];
|
||||
|
|
Loading…
Reference in New Issue