From 68eaa7d39b1b35b51eb3a15a2c50929e732447ba Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sat, 4 Jun 2022 10:07:15 +0200 Subject: [PATCH] Reload prices when ENTSO-E config has changed --- src/entsoe/EntsoeApi.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/entsoe/EntsoeApi.cpp b/src/entsoe/EntsoeApi.cpp index 8f89afaa..886e7201 100644 --- a/src/entsoe/EntsoeApi.cpp +++ b/src/entsoe/EntsoeApi.cpp @@ -27,7 +27,10 @@ void EntsoeApi::setup(EntsoeConfig& config) { this->config = new EntsoeConfig(); } memcpy(this->config, &config, sizeof(config)); - lastCurrencyFetch = 0; + lastTodayFetch = lastTomorrowFetch = lastCurrencyFetch = 0; + if(today != NULL) delete today; + if(tomorrow != NULL) delete tomorrow; + today = tomorrow = NULL; } char* EntsoeApi::getToken() {