diff --git a/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp b/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp index af813e8f..168675a9 100644 --- a/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp +++ b/rmw_zenoh_cpp/src/detail/zenoh_utils.hpp @@ -34,7 +34,8 @@ class ZenohSession final { public: ZenohSession(z_owned_session_t sess) - : inner_(sess) { + : inner_(sess) + { std::call_once(initFlag, [] { // This atexit function should be triggered before ZenohSession destruction // Refer to https://en.cppreference.com/w/cpp/utility/program/exit