Skip to content

Keep weak pointer to node in socket objects#4542

Merged
pwojcikdev merged 1 commit intonanocurrency:developfrom
pwojcikdev:networking-fixes/socket-node-weak-ptr
Apr 8, 2024
Merged

Keep weak pointer to node in socket objects#4542
pwojcikdev merged 1 commit intonanocurrency:developfrom
pwojcikdev:networking-fixes/socket-node-weak-ptr

Conversation

@pwojcikdev
Copy link
Copy Markdown
Contributor

There were occasional lifetime issues when running tests, where socket handlers would complete after parent node is destroyed. While using weak ptr to fix such issues is arguably a symptom of bad design, it's a necessary intermediate step to continue refactoring network code to eventually have async handlers properly controlled.

Copy link
Copy Markdown
Contributor

@clemahieu clemahieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a simple mechanical change and I don't see any behaviour changes besides the weak_ptr.

@pwojcikdev pwojcikdev merged commit 59285bf into nanocurrency:develop Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants