Merge pull request #55358 from timothyqiu/pop-front-3.x

[3.x] Fix potential infinite loop when connecting HTTPClient
This commit is contained in:
Rémi Verschelde 2021-11-30 09:26:38 +01:00 committed by GitHub
commit c4f7ba4686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -337,7 +337,7 @@ Error HTTPClient::poll() {
Error err = ERR_BUG; // Should be at least one entry.
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) {
break;
}