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

Async I/O spin when reading early EOF #960

Closed
sbordet opened this issue Sep 26, 2016 · 0 comments
Closed

Async I/O spin when reading early EOF #960

sbordet opened this issue Sep 26, 2016 · 0 comments

Comments

@sbordet
Copy link
Contributor

sbordet commented Sep 26, 2016

An incomplete request content is terminated early by an EOF.
HttpChannelOverHttp.earlyEOF() is notified, but the return value of HttpChannel.onEarlyEOF() is not tested. HttpParser goes into CLOSED state.
Because the application has not had the chance to read the -1, AsyncReadCallback is scheduled again to read from the socket. It fires immediately, but since the parser is already closed, it does not call the application, resulting in a spin.

sbordet added a commit that referenced this issue Sep 26, 2016
Now testing the return value of onEarlyEOF() and calling the
application when the value is true.
This means that the application can now consume the early EOF and the
spin does not happen.
sbordet added a commit that referenced this issue Sep 26, 2016
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

No branches or pull requests

1 participant