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

Refuse incoming/forbid outgoing connections after endpoint is closed #1829

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

Ralith
Copy link
Collaborator

@Ralith Ralith commented Apr 20, 2024

Endpoint::accept can yield None after Endpoint::close is called and any previously pending Incoming connections are drained, so it's likely that the application's accept loop will terminate and not see any further Incomings. This could lead to painful slow timeouts, so let's eagerly reject them instead.

@Ralith Ralith force-pushed the close-harder branch 2 times, most recently from 581b000 to 436e539 Compare April 20, 2024 17:08
@Ralith Ralith changed the title Refuse incoming connections after endpoint is closed Refuse incoming/forbid outgoing connections after endpoint is closed Apr 20, 2024
@djc djc enabled auto-merge (rebase) April 22, 2024 07:47
@djc djc merged commit 040f6d7 into main Apr 22, 2024
8 checks passed
@djc djc deleted the close-harder branch April 22, 2024 12:56
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