File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -434,7 +434,15 @@ void StatusManager::bootNotificationProcess()
434434
435435 // Configure hearbeat
436436 std::chrono::seconds interval (boot_conf.interval );
437- m_ocpp_config.heartbeatInterval (interval);
437+ if (boot_conf.interval == 0 )
438+ {
439+ interval = m_ocpp_config.heartbeatInterval ();
440+ }
441+ else
442+ {
443+ m_ocpp_config.heartbeatInterval (interval);
444+ }
445+
438446 m_heartbeat_timer.start (std::chrono::milliseconds (interval));
439447 }
440448 else
@@ -551,7 +559,15 @@ void StatusManager::sendBootNotification()
551559
552560 // Restart hearbeat timer
553561 std::chrono::seconds interval (boot_conf.interval );
554- m_ocpp_config.heartbeatInterval (interval);
562+ if (boot_conf.interval == 0 )
563+ {
564+ interval = m_ocpp_config.heartbeatInterval ();
565+ }
566+ else
567+ {
568+ m_ocpp_config.heartbeatInterval (interval);
569+ }
570+
555571 m_heartbeat_timer.restart (std::chrono::milliseconds (interval));
556572
557573 // Save registration status
You can’t perform that action at this time.
0 commit comments