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

Fix concurrent accepts #2403

Merged
merged 2 commits into from May 23, 2019

Conversation

3 participants
@ry
Copy link
Collaborator

commented May 23, 2019

No description provided.

@ry ry requested a review from piscisaureus May 23, 2019

Show resolved Hide resolved cli/resources.rs Outdated
@piscisaureus

This comment has been minimized.

Copy link
Collaborator

commented May 23, 2019

I don't really understand how this works and I'd like to...
How does storing / forgetting the associated task cancel a future?
But it seems to pass the test so I'll approve it.

@ry

This comment has been minimized.

Copy link
Collaborator Author

commented May 23, 2019

@piscisaureus When a TCPListener is closed, if there are pending accept futures for that server, they will not be woken up. (This seems like a bug in Tokio, actually.) The solution is to associate the Accept future (actually the current task) with the TCPListener and manually poll it (using Task::notify), when that happens the accept future errors out.

@ry ry merged commit 583a646 into denoland:master May 23, 2019

3 checks passed

Travis CI - Pull Request Build Passed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.