Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
transport: add timeout for writing GOAWAY on http2Client.Close() #7371
transport: add timeout for writing GOAWAY on http2Client.Close() #7371
Changes from 1 commit
6c316d6
284f45b
44d0979
73da571
b083d8c
2525c9b
cd7b716
bc66ca9
8ffe575
a684542
59cc230
b9a16d4
3ec2ccb
4a6bcf5
205fbdf
a7a7bb5
9636c56
aebe562
fad99ba
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Remove this timer? Otherwise it will release on its own and pass on master@HEAD, won't it?
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.
Ping, this doesn't seem done.
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.
Umm... I think we would need to have timeout for
hc.hangConn
, otherwise this go-routine will be leaked via this call. Sohc.Conn.Write
will be hang after we made this write to the conn, which will eventually make the above go-routine to run forever and end up in leaked go-routine.(btw we already have deadline for net.Conn.Write defined here at the top of ct.Close, but then the current test will test only for this loopyWriter to timeout).WDYT?
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.
Not entirely familiar with the goroutine you are referring to but one suggestion is that you probably don't have to do the actual write
n, err = hc.Conn.Write(b)
in case of goaway? You can just compare the passed bytesb
if its goaway and then just hang? or is that not possible because different structs are being written?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.
Ah, actually we don't even need to compare it, we can just make sure hangingConn hangs from the time it receives the goAway request.
@dfawley I have removed the timer logic for
hc.Write
, and updated the PR.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.
probably good to release the
<-hc.hangConn
at the end of test?