diff --git a/examples/cpp/discovery_server/CLIParser.hpp b/examples/cpp/discovery_server/CLIParser.hpp index e18393117ab..3c3345769e3 100644 --- a/examples/cpp/discovery_server/CLIParser.hpp +++ b/examples/cpp/discovery_server/CLIParser.hpp @@ -176,7 +176,7 @@ class CLIParser std::cout << " -t , --topic 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 , --samples Number of samples to send " << std::endl; diff --git a/examples/cpp/discovery_server/ClientPublisherApp.cpp b/examples/cpp/discovery_server/ClientPublisherApp.cpp index 2d917fe0ece..75742960c85 100644 --- a/examples/cpp/discovery_server/ClientPublisherApp.cpp +++ b/examples/cpp/discovery_server/ClientPublisherApp.cpp @@ -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; }