Skip to content

Commit

Permalink
Fix bug in mqttCallback UNSUBSCRIBE (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulZC committed Feb 7, 2024
1 parent 5fd21ec commit b62fed2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion software/LTE.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class LTE : public SARA_R5 {
log_e("unsubscribe result %d but no topic", result);
} else {
std::vector<String>::iterator pos = std::find(topics.begin(), topics.end(), unsubTopic);
if (pos == topics.end()) {
if (pos != topics.end()) {
topics.erase(pos);
log_i("unsubscribe result %d topic \"%s\"", result, unsubTopic.c_str());
unsubTopic = "";
Expand Down

0 comments on commit b62fed2

Please sign in to comment.