Skip to content

Commit

Permalink
Update attributes before discovery information.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Nov 6, 2024
1 parent 987824d commit f51f799
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/cpp/rtps/participant/RTPSParticipantImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,13 @@ void RTPSParticipantImpl::update_attributes(
}
}

// Update the attributes data member
{
std::lock_guard<std::recursive_mutex> guard(*mp_mutex);
m_att = temp_atts;
}

// Update discovery information
{
std::lock_guard<std::recursive_mutex> lock(*pdp->getMutex());
local_participant_attributes_update_nts(temp_atts, pdp, this);
Expand Down Expand Up @@ -1890,12 +1897,6 @@ void RTPSParticipantImpl::update_attributes(
}
}

// Update the attributes data member
{
std::lock_guard<std::recursive_mutex> guard(*mp_mutex);
m_att = temp_atts;
}

if (update_pdp)
{
// Send DATA(P)
Expand Down

0 comments on commit f51f799

Please sign in to comment.