dns: improved handling 2nd server if first failed

This commit is contained in:
goldsimon 2015-09-30 14:22:39 +02:00
parent 927b72abd2
commit 373714c02f

View File

@ -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);