Skip to content

Commit

Permalink
Remove the unneeded initialized function from rmw_client_data.
Browse files Browse the repository at this point in the history
Not only is this unneeded, it is also improperly initialized
so was causing some problems in tests.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette committed Nov 13, 2024
1 parent 91edead commit 4118b30
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions rmw_zenoh_cpp/src/detail/rmw_client_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ rmw_ret_t ClientData::shutdown()
{
rmw_ret_t ret = RMW_RET_OK;
std::lock_guard<std::mutex> lock(mutex_);
if (is_shutdown_ || !initialized_) {
if (is_shutdown_) {
return ret;
}

Expand All @@ -545,7 +545,6 @@ rmw_ret_t ClientData::shutdown()
}

is_shutdown_ = true;
initialized_ = false;
return RMW_RET_OK;
}

Expand Down
2 changes: 0 additions & 2 deletions rmw_zenoh_cpp/src/detail/rmw_client_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ class ClientData final : public std::enable_shared_from_this<ClientData>
size_t sequence_number_;
// Shutdown flag.
bool is_shutdown_;
// Whether the object has ever successfully been initialized.
bool initialized_;
};
using ClientDataPtr = std::shared_ptr<ClientData>;
using ClientDataConstPtr = std::shared_ptr<const ClientData>;
Expand Down

0 comments on commit 4118b30

Please sign in to comment.