From e6c1a4386988edeae5785f4fdeec731f36b75d78 Mon Sep 17 00:00:00 2001 From: yuanyuyuan Date: Fri, 6 Dec 2024 23:38:17 +0800 Subject: [PATCH] fixup! refactor: wrap the zenoh session with a shared pointer --- rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp | 2 +- rmw_zenoh_cpp/src/detail/zenoh_utils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp b/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp index a2c98b93..944f5ff5 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp @@ -312,7 +312,7 @@ class rmw_context_impl_s::Data final } // Check that the Zenoh session is still valid. - if (z_session_is_closed(z_loan(session_))) { + if (z_session_is_closed(session_->loan())) { RMW_ZENOH_LOG_ERROR_NAMED( "rmw_zenoh_cpp", "Unable to create NodeData as Zenoh session is invalid."); diff --git a/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp b/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp index 398587c9..1b055f43 100644 --- a/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp +++ b/rmw_zenoh_cpp/src/detail/zenoh_utils.cpp @@ -25,7 +25,7 @@ namespace rmw_zenoh_cpp { -/// Close the zenoh session if destructed. +/// Loan the zenoh session. ///============================================================================= const z_loaned_session_t * ZenohSession::loan() {