From a9ed89f737c6561284ba6c2afe8c0a540ed3be0d Mon Sep 17 00:00:00 2001 From: "Maaike Zijderveld, iolar" Date: Wed, 12 Feb 2025 10:00:56 +0100 Subject: [PATCH] Bug was caused by security event messages stored in the database. Setting a flag when retrieving it from the database to wait sending the message until the bootnotification is accepted, fixes it. Signed-off-by: Maaike Zijderveld, iolar --- include/ocpp/common/message_queue.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ocpp/common/message_queue.hpp b/include/ocpp/common/message_queue.hpp index d5726976d..ee51baf41 100644 --- a/include/ocpp/common/message_queue.hpp +++ b/include/ocpp/common/message_queue.hpp @@ -601,7 +601,7 @@ template class MessageQueue { } } else { std::shared_ptr> message = - std::make_shared>(persisted_message.json_message); + std::make_shared>(persisted_message.json_message, true); message->messageType = string_to_messagetype(persisted_message.message_type); message->timestamp = persisted_message.timestamp; message->message_attempts = persisted_message.message_attempts;