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

SendStream::poll_capacity can return Some(0) #270

Closed
carllerche opened this issue Apr 30, 2018 · 1 comment
Closed

SendStream::poll_capacity can return Some(0) #270

carllerche opened this issue Apr 30, 2018 · 1 comment
Assignees
Labels

Comments

@carllerche
Copy link
Collaborator

I don't think this should happen, and am not entirely sure why it is yet.

@carllerche carllerche added the bug label Apr 30, 2018
@carllerche
Copy link
Collaborator Author

This happens because calling send_data when there isn't currently enough assigned capacity results in an attempt to assign capacity to the stream.

The implementation of assign_capacity sets send_capacity_inc to true which results in poll_capacity returning Ready even though there isn't any real capacity.

Setting send_capacity_inc should be smarter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants