Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autonatv2: recover from panics #2992

Merged
merged 2 commits into from
Oct 4, 2024
Merged

autonatv2: recover from panics #2992

merged 2 commits into from
Oct 4, 2024

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Oct 2, 2024

No description provided.

Copy link
Collaborator

@MarcoPolo MarcoPolo left a comment

Choose a reason for hiding this comment

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

One question around cleaning up the stream

@@ -248,6 +250,12 @@ func newDialRequest(reqs []Request, nonce uint64) pb.Message {

// handleDialBack receives the nonce on the dial-back stream
func (ac *client) handleDialBack(s network.Stream) {
defer func() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to ensure that the stream has been closed?

Copy link
Member Author

@sukunrt sukunrt Oct 3, 2024

Choose a reason for hiding this comment

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

Yes. We should reset the stream on panic. aa2caf0

@MarcoPolo MarcoPolo merged commit 6c2d56b into master Oct 4, 2024
11 checks passed
MarcoPolo pushed a commit that referenced this pull request Oct 4, 2024
* autonatv2: catch panics

* reset streams on panic
sukunrt added a commit that referenced this pull request Oct 4, 2024
* autonatv2: catch panics

* reset streams on panic
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