Skip to content

fix: report SUBSCRIBE and PUBLISH that never leave the client - #582

Open
johnnyh1975 wants to merge 7 commits into
pschmitt:mainfrom
johnnyh1975:fix/mqtt-return-codes
Open

fix: report SUBSCRIBE and PUBLISH that never leave the client#582
johnnyh1975 wants to merge 7 commits into
pschmitt:mainfrom
johnnyh1975:fix/mqtt-return-codes

Conversation

@johnnyh1975

Copy link
Copy Markdown

subscribe() and publish() discarded paho's return code. When the client
is not connected paho returns MQTT_ERR_NO_CONN and no packet is sent at
all, but both calls returned as though they had succeeded.

The observable result is a subscription that reports nothing for the
rest of its life, or a command that never reaches the robot, in both
cases with nothing anywhere saying so. publish("cmd", ...) is the path
every command takes.

Check the return code and log it. No signature change and no protocol
change: the check works at any QoS.

Signed-off-by: johnnyh1975 <jean-christoph@5heyne.de>
Signed-off-by: johnnyh1975 <jean-christoph@5heyne.de>
Signed-off-by: johnnyh1975 <jean-christoph@5heyne.de>
Signed-off-by: johnnyh1975 <jean-christoph@5heyne.de>
subscribe() and publish() discarded paho's return code. When the client
is not connected paho returns MQTT_ERR_NO_CONN and no packet is sent at
all, but both calls returned as though they had succeeded.

The observable result is a subscription that reports nothing for the
rest of its life, or a command that never reaches the robot, in both
cases with nothing anywhere saying so. publish("cmd", ...) is the path
every command takes.

Check the return code and log it. No signature change and no protocol
change: the check works at any QoS.


Signed-off-by: johnnyh1975 <jean-christoph@5heyne.de>
subscribe() and publish() discarded paho's return code. When the client
is not connected paho returns MQTT_ERR_NO_CONN and no packet is sent at
all, but both calls returned as though they had succeeded.

The observable result is a subscription that reports nothing for the
rest of its life, or a command that never reaches the robot, in both
cases with nothing anywhere saying so. publish("cmd", ...) is the path
every command takes.

Check the return code and log it. No signature change and no protocol
change: the check works at any QoS.


Signed-off-by: johnnyh1975 <jean-christoph@5heyne.de>
Signed-off-by: johnnyh1975 <jean-christoph@5heyne.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant