From 446aec3121850d7f1514f8a7aa50405357f00148 Mon Sep 17 00:00:00 2001 From: Yadunund Date: Fri, 19 Jan 2024 16:01:08 +0800 Subject: [PATCH] Cleanup Signed-off-by: Yadunund --- rmw_zenoh_cpp/src/detail/rmw_data_types.cpp | 2 +- rmw_zenoh_cpp/src/rmw_zenoh.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/rmw_zenoh_cpp/src/detail/rmw_data_types.cpp b/rmw_zenoh_cpp/src/detail/rmw_data_types.cpp index 7a76a2f4..acaa37db 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_data_types.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_data_types.cpp @@ -58,7 +58,7 @@ void sub_data_handler( if (sub_data->message_queue.size() >= sub_data->adapted_qos_profile.depth) { // Log warning if message is discarded due to hitting the queue depth - RCUTILS_LOG_WARN_NAMED( + RCUTILS_LOG_DEBUG_NAMED( "rmw_zenoh_cpp", "Message queue depth of %ld reached, discarding oldest message " "for subscription for %s", diff --git a/rmw_zenoh_cpp/src/rmw_zenoh.cpp b/rmw_zenoh_cpp/src/rmw_zenoh.cpp index 1432f4b2..57887309 100644 --- a/rmw_zenoh_cpp/src/rmw_zenoh.cpp +++ b/rmw_zenoh_cpp/src/rmw_zenoh.cpp @@ -619,12 +619,11 @@ rmw_create_publisher( // Set congestion_control to BLOCK if appropriate. z_publisher_options_t opts = z_publisher_options_default(); + opts.congestion_control = Z_CONGESTION_CONTROL_DROP; if (publisher_data->adapted_qos_profile.history == RMW_QOS_POLICY_HISTORY_KEEP_ALL && publisher_data->adapted_qos_profile.reliability == RMW_QOS_POLICY_RELIABILITY_RELIABLE) { opts.congestion_control = Z_CONGESTION_CONTROL_BLOCK; - } else { - opts.congestion_control = Z_CONGESTION_CONTROL_DROP; } // TODO(clalancette): What happens if the key name is a valid but empty string? publisher_data->pub = z_declare_publisher( @@ -1383,7 +1382,6 @@ rmw_create_subscription( RMW_SET_ERROR_MSG("unable to create zenoh subscription"); return nullptr; } - printf("Created querying sub %s\n", owned_key_str._cstr); } // Create a regular subscriber for all other durability settings. else { @@ -1401,7 +1399,6 @@ rmw_create_subscription( RMW_SET_ERROR_MSG("unable to create zenoh subscription"); return nullptr; } - printf("Created regular sub %s\n", owned_key_str._cstr); } auto undeclare_z_sub = rcpputils::make_scope_exit(