Fix potential infinite loop when connecting HTTPClient
This commit is contained in:
parent
f11bed249b
commit
de1cdc2102
1 changed files with 1 additions and 1 deletions
|
@ -337,7 +337,7 @@ Error HTTPClient::poll() {
|
||||||
|
|
||||||
Error err = ERR_BUG; // Should be at least one entry.
|
Error err = ERR_BUG; // Should be at least one entry.
|
||||||
while (ip_candidates.size() > 0) {
|
while (ip_candidates.size() > 0) {
|
||||||
err = tcp_connection->connect_to_host(ip_candidates.front(), conn_port);
|
err = tcp_connection->connect_to_host(ip_candidates.pop_front(), conn_port);
|
||||||
if (err == OK) {
|
if (err == OK) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue