Skip to content

Commit

Permalink
Don't ignore retained messages
Browse files Browse the repository at this point in the history
The VRM broker will be updated to ensure that this isn't a problem
in future once more clients connect to VRM.

FlashMQ on the CerboGX doesn't emit retained messages (except for
the serial and keepalive topics) so it doesn't need special
handling there.
  • Loading branch information
chriadam committed Aug 4, 2023
1 parent d2fe5c1 commit b8b4be2
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/qt/ve_qitems_mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,6 @@ void VeQItemMqttProducer::onSubscriptionMessageReceived(const QMqttMessage &mess
const QString keepaliveTopic = notificationPrefix + QStringLiteral("/keepalive");
if (topicName.compare(keepaliveTopic, Qt::CaseInsensitive) == 0) {
// ignore keepalive topic.
} else if (!mIsVrmBroker && message.retain()) {
// ignore retained messages, as for internet brokers (VRM)
// nothing will "unpublish" the topic for a device which goes offline.
// see issue #313 in gui-v2.
// for now, only enable this for non-VRM (i.e. local) brokers,
// as VRM is not yet using FlashMQ.
} else {
// we have a topic message which we need to expose via VeQItem.
const QString path = topicName.mid(notificationPrefix.size() + 1);
Expand Down

0 comments on commit b8b4be2

Please sign in to comment.