Skip to content

Commit

Permalink
Merge pull request OpenDDS#4548 from jrw972/rtps-udp-datalink-heartbe…
Browse files Browse the repository at this point in the history
…at-gap

RtpsUdpDataLink sends nacks when writer has clearly moved on
  • Loading branch information
jrw972 authored Mar 29, 2024
2 parents c29c704 + cc6d4b5 commit ca06163
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dds/DCPS/transport/rtps_udp/RtpsUdpDataLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,13 @@ RtpsUdpDataLink::RtpsReader::process_heartbeat_i(const RTPS::HeartBeatSubmessage
log_progress("RTPS reader/writer association complete", id_, writer->id_, writer->participant_discovered_at_);
}
log_remote_counts("process_heartbeat_i");
first_ever_hb = true;
}


ACE_CDR::ULong cumulative_bits_added = 0;
if (!writer->recvd_.empty() || first_ever_hb) {
// "gap" everything before the heartbeat range
const SequenceRange sr(zero, hb_first.previous());
writer->recvd_.insert(sr);
while (!writer->held_.empty() && writer->held_.begin()->first <= sr.second) {
Expand All @@ -1978,11 +1984,7 @@ RtpsUdpDataLink::RtpsReader::process_heartbeat_i(const RTPS::HeartBeatSubmessage
writer->recvd_.insert(it->first);
}
link->receive_strategy()->remove_fragments(sr, writer->id_);
first_ever_hb = true;
}

ACE_CDR::ULong cumulative_bits_added = 0;
if (!writer->recvd_.empty()) {
writer->hb_last_ = std::max(writer->hb_last_, hb_last);
gather_ack_nacks_i(writer, link, !is_final, meta_submessages, cumulative_bits_added);
}
Expand Down

0 comments on commit ca06163

Please sign in to comment.