From 36df4f02ae433a176d4e5924ca3e25f10a01e3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piet=20G=C3=B6mpel?= <37657534+Pietfried@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:43:36 +0100 Subject: [PATCH] prioritizing bootnotification in message queue over transactional messages (#444) Signed-off-by: pietfried --- include/ocpp/common/message_queue.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/ocpp/common/message_queue.hpp b/include/ocpp/common/message_queue.hpp index 41e135f70..733b7bd5a 100644 --- a/include/ocpp/common/message_queue.hpp +++ b/include/ocpp/common/message_queue.hpp @@ -352,7 +352,8 @@ template class MessageQueue { queue_type = QueueType::Transaction; } } else { - if (transaction_message->timestamp <= message->timestamp) { + if (transaction_message->timestamp <= message->timestamp and + message->messageType != M::BootNotification) { EVLOG_debug << "transaction message timestamp <= normal message timestamp"; message = transaction_message; queue_type = QueueType::Transaction;