Skip to content

Commit

Permalink
Fix missing unsubscribe causing segv
Browse files Browse the repository at this point in the history
  • Loading branch information
wardru committed Oct 28, 2023
1 parent 7ed47fa commit 76bd1eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/pza/core/client.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ device::ptr client::create_device(const std::string &topic_str)
return nullptr;
}

_unsubscribe(topic_str + "/device/atts/identity");

if (json::get_string(identify_msg->get_payload_str(), "identity", "family", family) == -1) {
spdlog::error("Failed to get family from device");
return nullptr;
Expand Down
1 change: 1 addition & 0 deletions source/pza/core/device.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ void device::reset()
_manufacturer = "";
}


int device::_set_identity(const std::string &payload)
{
std::string family;
Expand Down

0 comments on commit 76bd1eb

Please sign in to comment.