-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
quic: fix connection close error when blocked socket gets unblocked #36238
Conversation
Signed-off-by: Dan Zhang <[email protected]>
/retest |
/assign @abeyad |
/retest |
@@ -242,7 +242,7 @@ void EnvoyQuicClientConnection::onFileEvent(uint32_t events, | |||
ASSERT(events & (Event::FileReadyType::Read | Event::FileReadyType::Write)); | |||
|
|||
if (events & Event::FileReadyType::Write) { | |||
OnCanWrite(); | |||
OnBlockedWriterCanWrite(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this call still work if the writer is not blocked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh nevermind, I see that it unblocks the writer before calling OnCanWrite()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and writer_->SetWritable()
is a no-op on unblocked writer:
void setWritable() override { write_blocked_ = false; } |
/assign @RyanTheOptimist |
Commit Message: today the connection will be closed with QUIC_INTERNAL_ERROR because of https://github.com/google/quiche/blob/4249f8025caed1e3d71d04d9cadf42251acb7cac/quiche/quic/core/quic_connection.cc#L2703 if the socket becomes write blocked and then unblocked. This change fixes it by calling OnBlockedWriterCanWrite() instead which set the writer to be unblocked before OnCanWrite().
Additional Message: also refined some comments in the same file.
Risk Level: low, fix existing issue
Testing: added unit tests
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A