mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-27 00:22:59 +00:00
dns: improved handling 2nd server if first failed
This commit is contained in:
parent
927b72abd2
commit
373714c02f
@ -1017,7 +1017,6 @@ dns_check_entry(u8_t i)
|
|||||||
entry->server_idx++;
|
entry->server_idx++;
|
||||||
entry->tmr = 1;
|
entry->tmr = 1;
|
||||||
entry->retries = 0;
|
entry->retries = 0;
|
||||||
break;
|
|
||||||
} else {
|
} else {
|
||||||
LWIP_DEBUGF(DNS_DEBUG, ("dns_check_entry: \"%s\": timeout\n", entry->name));
|
LWIP_DEBUGF(DNS_DEBUG, ("dns_check_entry: \"%s\": timeout\n", entry->name));
|
||||||
/* call specified callback function if provided */
|
/* call specified callback function if provided */
|
||||||
@ -1026,10 +1025,10 @@ dns_check_entry(u8_t i)
|
|||||||
entry->state = DNS_STATE_UNUSED;
|
entry->state = DNS_STATE_UNUSED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
|
||||||
/* wait longer for the next retry */
|
/* wait longer for the next retry */
|
||||||
entry->tmr = entry->retries;
|
entry->tmr = entry->retries;
|
||||||
|
}
|
||||||
|
|
||||||
/* send DNS packet for this entry */
|
/* send DNS packet for this entry */
|
||||||
err = dns_send(i);
|
err = dns_send(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user