Skip to content

Commit

Permalink
Refs #20706: Apply review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
Mario-DL committed Apr 18, 2024
1 parent 51abaa7 commit cf9078c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cpp/fastdds/subscriber/history/DataReaderHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,13 @@ bool DataReaderHistory::get_first_untaken_info(
auto& instance_changes = it.second->cache_changes;
for (auto& instance_change : instance_changes)
{
WriterProxy* wp;
WriterProxy* wp = nullptr;
bool is_future_change = false;

if (mp_reader->begin_sample_access_nts(instance_change, wp, is_future_change))
{
std::lock_guard<RecursiveTimedMutex> _(mp_reader->getMutex());
if (mp_reader->begin_sample_access_nts(instance_change, wp, is_future_change) && is_future_change)
mp_reader->end_sample_access_nts(instance_change, wp, false);
if (is_future_change)
{
continue;
}
Expand Down

0 comments on commit cf9078c

Please sign in to comment.