Skip to content

Commit bb09f2f

Browse files
pwuejescm6nu3
andcommitted
Notify readers about participant internal writers
Previously, readers didn't get liveliness updates on writers within the same participant using the automatic lifetime. This caused instances to get disposed, even if the writer was still alive. This change notifies the local readers in the similiar way as this is the case for readers on a different participant. Signed-off-by: Philipp Jeske <philipp.jeske@iqsight.com> Co-authored-by: Matthias Schneider <matthias.schneider6@iqsight.com>
1 parent 15519c1 commit bb09f2f

File tree

1 file changed

+11
-0
lines changed
  • src/cpp/rtps/builtin/liveliness

1 file changed

+11
-0
lines changed

src/cpp/rtps/builtin/liveliness/WLP.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,17 @@ bool WLP::remove_local_reader(
841841
bool WLP::automatic_liveliness_assertion()
842842
{
843843
std::unique_lock<std::recursive_mutex> lock(*mp_builtinProtocols->mp_PDP->getMutex());
844+
845+
// Assert liveliness for local readers (ADDED)
846+
if (automatic_readers_)
847+
{
848+
for (auto& writer : automatic_writers_)
849+
{
850+
sub_liveliness_manager_->assert_liveliness(
851+
dds::AUTOMATIC_LIVELINESS_QOS,
852+
writer->getGuid().guidPrefix);
853+
}
854+
}
844855

845856
if (0 < automatic_writers_.size())
846857
{

0 commit comments

Comments
 (0)