From de1cdc21021de350193716719fe1acc2ed6d48c2 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 26 Nov 2021 23:43:55 +0800 Subject: [PATCH] Fix potential infinite loop when connecting HTTPClient --- core/io/http_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index e30b59a6fdb..034f914db37 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -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; }