Skip to content

Commit

Permalink
fix scan function and remove one ugly fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodriguez committed Oct 10, 2023
1 parent af5ddbe commit 6f1ca75
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions source/pza/core/client.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ int client::scan_devices(void)
ret = cv.wait_for(lock, std::chrono::seconds(_scan_timeout), [&](void) {
return (_scan_device_count_expected && (_scan_device_count_expected == _scan_device_results.size()));
});
_unsubscribe("pza/server/+/+/atts/info");
_unsubscribe("pza/+/+/device/atts/info");

// Process timeout error
if (ret == false) {
Expand Down Expand Up @@ -281,9 +281,6 @@ int client::_scan_interfaces(std::unique_lock<std::mutex> &lock, const device::p
return -1;
}

// @TODO Dirty hack because the platform count the "device" as an interface but the scan mecanism exclude it
_scan_itf_count_expected -= 1;

_scan_itf_results.clear();

_subscribe(itf_topic, [&](const mqtt::const_message_ptr &msg) {
Expand Down

0 comments on commit 6f1ca75

Please sign in to comment.