mirror of https://github.com/getdnsapi/getdns.git
Merge branch 'bugfix/388-endless-fallback-loop' into release/1.4.1
This commit is contained in:
commit
fd5e0cdc02
|
@ -134,6 +134,7 @@ netreq_reset(getdns_network_req *net_req)
|
|||
uint8_t *buf;
|
||||
/* variables that need to be reset on reinit
|
||||
*/
|
||||
net_req->first_upstream = NULL;
|
||||
net_req->unbound_id = -1;
|
||||
_getdns_netreq_change_state(net_req, NET_REQ_NOT_SENT);
|
||||
if (net_req->query_id_registered) {
|
||||
|
|
|
@ -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