Repository navigation
Conversation
…is deleted on exit
ShapeApplication::initialize() declared a local `DomainParticipantFactory *dpf` that
shadowed the member of the same name. The member stayed NULL, so the destructor's
if (dpf) dpf->delete_participant( dp );
never ran. Every shape_main exited with its DomainParticipant still alive: the participant
was never deleted, its middleware threads were never stopped, and peers were not told it
had left, so they kept it until its lease expired.
Assign the member instead of declaring a local.
Contributor
|
Before merging, we need the CLA as well (https://github.com/omg-dds/dds-rtps/tree/master/CLA) thanks Mark! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #108.
ShapeApplication::initialize()declared a localDomainParticipantFactory *dpfthat shadowed the member of the same name, so the member stayedNULLand the destructor'sif (dpf) dpf->delete_participant( dp );never ran. Everyshape_mainexited with itsDomainParticipantstill alive.This assigns the member instead of declaring a local. With the change,
delete_participantis called on exit and returnsRETCODE_OK, the middleware threads stop, and the process exits normally.