Skip to content

Commit

Permalink
prioritizing bootnotification in message queue over transactional mes…
Browse files Browse the repository at this point in the history
…sages (#444)

Signed-off-by: pietfried <[email protected]>
  • Loading branch information
Pietfried authored Feb 2, 2024
1 parent 72c7a1f commit 36df4f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/ocpp/common/message_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ template <typename M> 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;
Expand Down

0 comments on commit 36df4f0

Please sign in to comment.