Skip to content

Commit

Permalink
fix: hold the session at the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan committed Dec 10, 2024
1 parent 9fdb567 commit 4f34079
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/detail/rmw_client_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ bool ClientData::init(std::shared_ptr<ZenohSession> session)
z_drop(z_move(this->token_));
});

sess_ = session;
initialized_ = true;

free_ros_keyexpr.cancel();
Expand Down Expand Up @@ -409,7 +410,6 @@ rmw_ret_t ClientData::send_request(
if (context_impl == nullptr) {
return RMW_RET_INVALID_ARGUMENT;
}
sess_ = context_impl->session();

size_t max_data_length = (
request_type_support_->get_estimated_serialized_size(
Expand Down

0 comments on commit 4f34079

Please sign in to comment.