diff --git a/examples/cpp/request_reply/ServerApp.cpp b/examples/cpp/request_reply/ServerApp.cpp index fe85a7c7555..598711673a1 100644 --- a/examples/cpp/request_reply/ServerApp.cpp +++ b/examples/cpp/request_reply/ServerApp.cpp @@ -208,6 +208,10 @@ void ServerApp::on_publication_matched( { request_reply_error("ServerApp", info.current_count_change << " is not a valid value for PublicationMatchedStatus current count change"); + + // __FLAG__ + throw std::runtime_error("ERROR"); + ///////////////// } } @@ -241,6 +245,9 @@ void ServerApp::on_subscription_matched( request_reply_error("ServerApp", info.current_count_change << " is not a valid value for SubscriptionMatchedStatus current count change"); + // __FLAG__ + throw std::runtime_error("ERROR"); + ///////////////// } } diff --git a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp index 645fe9faa93..e3b83603c42 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp @@ -1279,8 +1279,8 @@ bool PDP::remove_remote_participant( ParticipantProxyData* pdata = nullptr; // Remove it from our vector of RTPSParticipantProxies + std::lock_guard guardPDP(*mp_mutex); { - std::lock_guard guardPDP(*mp_mutex); for (ResourceLimitedVector::iterator pit = participant_proxies_.begin(); pit != participant_proxies_.end(); ++pit) {