Skip to content

Commit

Permalink
Refs #7920. Sending initial gap along with heartbeat for volatile.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Apr 30, 2020
1 parent 1f431ff commit 30f8f6f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/cpp/rtps/writer/StatefulWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1756,6 +1756,20 @@ void StatefulWriter::send_heartbeat_to_nts(
{
RTPSMessageGroup group(mp_RTPSParticipant, this, remoteReaderProxy.message_sender());
send_heartbeat_nts_(1u, group, disable_positive_acks_, liveliness);
SequenceNumber_t first_seq = get_seq_num_min();
if (first_seq != c_SequenceNumber_Unknown)
{
if (remoteReaderProxy.durability_kind() < TRANSIENT_LOCAL ||
getAttributes().durabilityKind < TRANSIENT_LOCAL)
{
SequenceNumber_t last_irrelevance = remoteReaderProxy.changes_low_mark();
if (first_seq <= last_irrelevance)
{
group.add_gap(first_seq, SequenceNumberSet_t(last_irrelevance + 1));
}
}

}
}
catch (const RTPSMessageGroup::timeout&)
{
Expand Down

0 comments on commit 30f8f6f

Please sign in to comment.