Skip to content

Commit 97dcf1f

Browse files
avoid sending queue messages before sending the status of connectors
1 parent 65731ea commit 97dcf1f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/chargepoint/status/StatusManager.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,13 @@ void StatusManager::bootNotificationProcess()
412412
boot_req.imsi.value().assign(m_stack_config.imsi());
413413
boot_req.meterSerialNumber.value().assign(m_stack_config.meterSerialNumber());
414414

415+
m_registration_status = RegistrationStatus::Rejected;
415416
// Send BootNotificationRequest
416417
BootNotificationConf boot_conf;
417418
CallResult result = m_msg_sender.call(BOOT_NOTIFICATION_ACTION, boot_req, boot_conf);
418419
if (result == CallResult::Ok)
419-
{
420-
m_registration_status = boot_conf.status;
421-
if (m_registration_status == RegistrationStatus::Accepted)
420+
{
421+
if (boot_conf.status == RegistrationStatus::Accepted)
422422
{
423423
// Send first status notifications
424424
for (unsigned int id = 0; id <= m_connectors.getCount(); id++)
@@ -437,6 +437,7 @@ void StatusManager::bootNotificationProcess()
437437
m_boot_notification_timer.start(std::chrono::seconds(boot_conf.interval), true);
438438
}
439439

440+
m_registration_status = boot_conf.status;
440441
std::string registration_status = RegistrationStatusHelper.toString(m_registration_status);
441442
LOG_INFO << "Registration status : " << registration_status;
442443

0 commit comments

Comments
 (0)