Skip to content

Commit

Permalink
Refs #21095: Only change datawriter reliability when reliable is false
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <[email protected]>
  • Loading branch information
Mario-DL committed Jun 18, 2024
1 parent da68318 commit 30b3a2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/cpp/discovery_server/CLIParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class CLIParser
std::cout << " -t <str>, --topic <str> Topic name" << std::endl;
std::cout << " (Default: discovery_server_topic)." << std::endl;
std::cout << " -r, --reliable Set Reliability QoS as reliable" << std::endl;
std::cout << " (Default: reliable)" << std::endl;
std::cout << " (Default: best effort)" << std::endl;
std::cout << " --transient-local Set Durability QoS as transient local" << std::endl;
std::cout << " (Default: volatile)" << std::endl;
std::cout << " -s <num>, --samples <num> Number of samples to send " << std::endl;
Expand Down
6 changes: 1 addition & 5 deletions examples/cpp/discovery_server/ClientPublisherApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,7 @@ ClientPublisherApp::ClientPublisherApp(
// Create de data writer
DataWriterQos wqos = DATAWRITER_QOS_DEFAULT;

if (config.reliable)
{
wqos.reliability().kind = RELIABLE_RELIABILITY_QOS;
}
else
if (!config.reliable)
{
wqos.reliability().kind = BEST_EFFORT_RELIABILITY_QOS;
}
Expand Down

0 comments on commit 30b3a2c

Please sign in to comment.