diff --git a/ddspipe_core/src/cpp/communication/dds/DdsBridge.cpp b/ddspipe_core/src/cpp/communication/dds/DdsBridge.cpp index 8ec0d35b..18ca0c4d 100644 --- a/ddspipe_core/src/cpp/communication/dds/DdsBridge.cpp +++ b/ddspipe_core/src/cpp/communication/dds/DdsBridge.cpp @@ -259,6 +259,11 @@ void DdsBridge::add_writers_to_tracks_( std::move(writers_of_reader), payload_pool_, thread_pool_); + + if (enabled_) + { + tracks_[id]->enable(); + } } } } diff --git a/ddspipe_core/src/cpp/core/DdsPipe.cpp b/ddspipe_core/src/cpp/core/DdsPipe.cpp index d240541c..0547fc43 100644 --- a/ddspipe_core/src/cpp/core/DdsPipe.cpp +++ b/ddspipe_core/src/cpp/core/DdsPipe.cpp @@ -321,10 +321,8 @@ void DdsPipe::removed_endpoint_nts_( if (it_bridge == bridges_.end()) { - // The bridge does not exist. Error. - logError(DDSPIPE, - "Error finding Bridge for topic " << topic << - ". The Bridge does not exist."); + // The bridge does not exist. We cannot remove the writer. Exit. + return; } else if (dynamic_tracks_) { diff --git a/ddspipe_core/src/cpp/testing/random_values.cpp b/ddspipe_core/src/cpp/testing/random_values.cpp index 13d8d35e..27001f9e 100644 --- a/ddspipe_core/src/cpp/testing/random_values.cpp +++ b/ddspipe_core/src/cpp/testing/random_values.cpp @@ -91,11 +91,16 @@ Endpoint random_endpoint( unsigned int seed /* = 0 */) { Endpoint endpoint; + endpoint.active = (seed % 2); endpoint.guid = random_guid(seed); - endpoint.discoverer_participant_id = random_participant_id(seed); endpoint.kind = random_endpoint_kind(seed); endpoint.topic = random_dds_topic(seed); + + // The discoverer participant id cannot be random. + // It must belong to an actual participant or be an empty string. + endpoint.discoverer_participant_id = ""; + return endpoint; }