From 9ac300a16b0dca335dfe1e5a777124d8bb7fbaa4 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Tue, 28 Dec 2021 22:53:49 +0100 Subject: [PATCH] Fixed requests only working one time --- src/asynchttprequest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asynchttprequest.cpp b/src/asynchttprequest.cpp index 098da73..7942566 100644 --- a/src/asynchttprequest.cpp +++ b/src/asynchttprequest.cpp @@ -522,7 +522,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 = {}; } } -- 2.50.1