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

autonat: fix flaky TestAutoNATDialRefused #2245

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Apr 6, 2023

No description provided.

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

Can we just shut down the host / remove the stream handler, so it doesn't get called again?

@sukunrt
Copy link
Member Author

sukunrt commented Apr 10, 2023

That won't solve it.

Here we wait for 3 seconds for a dialback request to finish. When require.Never exits some probes may still be in progress. When we close the host it resets all the open streams and that leads to the stream reset error here

Closing host or removing the streamhandler will not fix this.

The cleaner solution is to fix autonat.Close to clean up outstanding probes. I'm not sure if that's the right thing since a dialback request has no timeout so we might have to wait a while.

@marten-seemann marten-seemann changed the title fix flaky TestAutoNATDialRefused autonat: fix flaky TestAutoNATDialRefused Apr 11, 2023
@marten-seemann marten-seemann merged commit 952f7cb into libp2p:master Apr 11, 2023
@sukunrt
Copy link
Member Author

sukunrt commented Apr 11, 2023

correction. the timeout for autonat dialback is 1 minute.

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