From 50487cf5640491fa889408af6192aab0decacbab Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Mon, 3 Jan 2022 19:25:46 +0100 Subject: [PATCH] Fixed request not being closed --- src/asynchttprequest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asynchttprequest.cpp b/src/asynchttprequest.cpp index f91976c..5763dd6 100644 --- a/src/asynchttprequest.cpp +++ b/src/asynchttprequest.cpp @@ -526,7 +526,7 @@ void AsyncHttpRequest::requestTask() // workaround for esp-idf bug, every request after the first one fails with ESP_ERR_HTTP_FETCH_HEADER const auto result = m_client.close(); ESP_LOG_LEVEL_LOCAL((result == ESP_OK ? ESP_LOG_VERBOSE : ESP_LOG_ERROR), TAG, "m_client.close() returned: %s", esp_err_to_name(result)); - //if (result != ESP_OK) - // m_client = {}; + if (result == ESP_OK) + m_client = {}; } }