From 66494e3293ce33d735b9f978fdcb87a23e4e68a9 Mon Sep 17 00:00:00 2001 From: Yadu Date: Wed, 7 Feb 2024 11:36:34 +0800 Subject: [PATCH] Update rmw_zenoh_cpp/src/rmw_zenoh.cpp Co-authored-by: Chris Lalancette Signed-off-by: Yadu --- rmw_zenoh_cpp/src/rmw_zenoh.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rmw_zenoh_cpp/src/rmw_zenoh.cpp b/rmw_zenoh_cpp/src/rmw_zenoh.cpp index 8cc5c9cf..0f92a083 100644 --- a/rmw_zenoh_cpp/src/rmw_zenoh.cpp +++ b/rmw_zenoh_cpp/src/rmw_zenoh.cpp @@ -1393,9 +1393,8 @@ rmw_create_subscription( RMW_SET_ERROR_MSG("unable to create zenoh subscription"); return nullptr; } - } - // Create a regular subscriber for all other durability settings. - else { + } else { + // Create a regular subscriber for all other durability settings. z_subscriber_options_t sub_options = z_subscriber_options_default(); if (qos_profile->reliability == RMW_QOS_POLICY_RELIABILITY_RELIABLE) { sub_options.reliability = Z_RELIABILITY_RELIABLE;