Skip to content

Commit a9dfd62

Browse files
committed
Refs #20629: Protect pdp_to_send
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
1 parent 5c127aa commit a9dfd62

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/cpp/rtps/builtin/discovery/database/DiscoveryDataBase.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2341,6 +2341,7 @@ bool DiscoveryDataBase::add_pdp_to_send_(
23412341
eprosima::fastrtps::rtps::CacheChange_t* change)
23422342
{
23432343
// Add DATA(p) to send in next iteration if it is not already there
2344+
std::lock_guard<std::recursive_mutex> guard(mutex_);
23442345
if (std::find(
23452346
pdp_to_send_.begin(),
23462347
pdp_to_send_.end(),

0 commit comments

Comments
 (0)