From 2d27c7e9e057d1bd3afa41295fd82e83ea57ab1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piet=20G=C3=B6mpel?= <37657534+Pietfried@users.noreply.github.com> Date: Thu, 11 Apr 2024 12:46:47 +0200 Subject: [PATCH] Start OCSP updater only when successfully connected to CSMS. Increase retry to 24h (#559) Signed-off-by: pietfried --- include/ocpp/v201/ocsp_updater.hpp | 2 +- lib/ocpp/v201/charge_point.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ocpp/v201/ocsp_updater.hpp b/include/ocpp/v201/ocsp_updater.hpp index 26c37d60dd..5a12680e5a 100644 --- a/include/ocpp/v201/ocsp_updater.hpp +++ b/include/ocpp/v201/ocsp_updater.hpp @@ -45,7 +45,7 @@ class OcspUpdater { OcspUpdater() = delete; OcspUpdater(std::shared_ptr evse_security, cert_status_func get_cert_status_from_csms, std::chrono::seconds ocsp_cache_update_interval = std::chrono::hours(167), - std::chrono::seconds ocsp_cache_update_retry_interval = std::chrono::seconds(5)); + std::chrono::seconds ocsp_cache_update_retry_interval = std::chrono::hours(24)); void start(); void stop(); diff --git a/lib/ocpp/v201/charge_point.cpp b/lib/ocpp/v201/charge_point.cpp index a681e25848..833d9eccbc 100644 --- a/lib/ocpp/v201/charge_point.cpp +++ b/lib/ocpp/v201/charge_point.cpp @@ -181,7 +181,6 @@ void ChargePoint::start(BootReasonEnum bootreason) { this->component_state_manager->trigger_all_effective_availability_changed_callbacks(); this->boot_notification_req(bootreason); this->start_websocket(); - this->ocsp_updater.start(); // FIXME(piet): Run state machine with correct initial state } @@ -2130,6 +2129,7 @@ void ChargePoint::handle_boot_notification_response(CallResultinit_certificate_expiration_check_timers(); this->update_aligned_data_interval(); this->component_state_manager->send_status_notification_all_connectors(); + this->ocsp_updater.start(); if (this->bootreason == BootReasonEnum::RemoteReset) { this->security_event_notification_req(