mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +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,11 +1025,11 @@ 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 */
|
||||||
|
entry->tmr = entry->retries;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait longer for the next retry */
|
|
||||||
entry->tmr = entry->retries;
|
|
||||||
|
|
||||||
/* send DNS packet for this entry */
|
/* send DNS packet for this entry */
|
||||||
err = dns_send(i);
|
err = dns_send(i);
|
||||||
if (err != ERR_OK) {
|
if (err != ERR_OK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user