Skip to content

Commit

Permalink
Start OCSP updater only when successfully connected to CSMS. Increase…
Browse files Browse the repository at this point in the history
… retry to 24h (EVerest#559)

Signed-off-by: pietfried <[email protected]>
  • Loading branch information
Pietfried authored and folkengine committed Apr 15, 2024
1 parent 7430cf5 commit 2d27c7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/ocpp/v201/ocsp_updater.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class OcspUpdater {
OcspUpdater() = delete;
OcspUpdater(std::shared_ptr<EvseSecurity> 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();
Expand Down
2 changes: 1 addition & 1 deletion lib/ocpp/v201/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -2130,6 +2129,7 @@ void ChargePoint::handle_boot_notification_response(CallResult<BootNotificationR
this->init_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(
Expand Down

0 comments on commit 2d27c7e

Please sign in to comment.