Add test coverage & clean up handshakes received when suspended & reorder clearing - #285
Open
lejeunerenard wants to merge 6 commits into
Open
Add test coverage & clean up handshakes received when suspended & reorder clearing#285lejeunerenard wants to merge 6 commits into
lejeunerenard wants to merge 6 commits into
Conversation
Guard already exists and the test shows it works.
How this could happen has not been reproduced yet, but it is safe change as any `hs` that gets cleared should ensure the noise key entry in `_connects` is cleared regardless of the `_holepunches` entry. Test by @HDegroote
mafintosh
previously approved these changes
Aug 12, 2026
mafintosh
reviewed
Aug 13, 2026
…oesnt match" This reverts commit 4c2cac4.
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.
This PR came from explorations around potential memory leaks. It includes the following:
peer cant flood w/ handshakes._connects.delete(k)to before clearing holepunch entry.Not required but is clearer that it always is cleared now and that a holepunch entry missing can't leak
_connectsthough it was never observed to do so._holepunchesentries when received during closing or being suspended. Test calledhandshakes that arrive while the server is suspended are cleared_clear deletes the _connects entry even when the slot was reusedcredited to @HDegroote for writing.