Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,12 @@ std::shared_ptr<PublisherData> PublisherData::make(
zenoh::KeyExpr pub_ke(entity->topic_info()->topic_keyexpr_);
// Set congestion_control to BLOCK if appropriate.
auto pub_opts = zenoh::Session::PublisherOptions::create_default();
pub_opts.congestion_control = Z_CONGESTION_CONTROL_DROP;
if (adapted_qos_profile.reliability == RMW_QOS_POLICY_RELIABILITY_RELIABLE) {
pub_opts.reliability = Z_RELIABILITY_RELIABLE;
if (adapted_qos_profile.history == RMW_QOS_POLICY_HISTORY_KEEP_ALL) {
pub_opts.congestion_control = Z_CONGESTION_CONTROL_BLOCK;
}
pub_opts.congestion_control = Z_CONGESTION_CONTROL_BLOCK;
} else {
pub_opts.reliability = Z_RELIABILITY_BEST_EFFORT;
pub_opts.congestion_control = Z_CONGESTION_CONTROL_DROP;
}
adv_pub_opts.publisher_options = pub_opts;

Expand Down