From 5fee069c65da9423e315ffad01c8661833d62f0c Mon Sep 17 00:00:00 2001 From: Sven Sowa Date: Sun, 21 Jul 2024 17:59:57 +0200 Subject: [PATCH] Remove double call to generateOnBatteryJsonResponse() (#1115) the 2nd call was added in a merge operation in April --- src/WebApi_ws_live.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/WebApi_ws_live.cpp b/src/WebApi_ws_live.cpp index 85781bce..17e5a52e 100644 --- a/src/WebApi_ws_live.cpp +++ b/src/WebApi_ws_live.cpp @@ -332,9 +332,7 @@ void WebApiWsLiveClass::onLivedataStatus(AsyncWebServerRequest* request) generateOnBatteryJsonResponse(root, true); - generateOnBatteryJsonResponse(root, true); - - WebApi.sendJsonResponse(request, response, __FUNCTION__, __LINE__); + WebApi.sendJsonResponse(request, response, __FUNCTION__, __LINE__); } catch (const std::bad_alloc& bad_alloc) { MessageOutput.printf("Calling /api/livedata/status has temporarily run out of resources. Reason: \"%s\".\r\n", bad_alloc.what());