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

http2: perform connection health check #55

Closed
wants to merge 1 commit into from

Conversation

caesarxuchao
Copy link
Contributor

@caesarxuchao caesarxuchao commented Oct 1, 2019

After the connection has been idle for a while, periodic pings are sent
over the connection to check its health. Unhealthy connection is closed
and removed from the connection pool.

Fixes golang/go#31643

@gopherbot
Copy link
Contributor

This PR (HEAD: bc0d6c6) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/198040 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Brad Fitzpatrick:

Patch Set 1:

(11 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Chao Xu:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 840ca83) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/198040 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: b2e6f87) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/198040 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Chao Xu:

Patch Set 2:

Hi Brad,

Thank you for the review. I modified the periodic ping behavior to start only after the readloop has been idle for a while, and to stop once new frame is received in the readloop.

I have also addressed other comments.

PTAL. Thank you.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Chao Xu:

Patch Set 3:

Patch Set 2:

Hi Brad,

Thank you for the review. I modified the periodic ping behavior to start only after the readloop has been idle for a while, and to stop once new frame is received in the readloop.

I have also addressed other comments.

PTAL. Thank you.

I will be OOO until Oct. 30.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Brad Fitzpatrick:

Patch Set 3:

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 331a10c) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/198040 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Brad Fitzpatrick:

Patch Set 4:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Daniel Smith:

Patch Set 4:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Chao Xu:

Patch Set 4:

(4 comments)

Patch Set 4:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 5058c86) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/198040 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Andrew Bonventre:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Fraenkel:

Patch Set 5:

(4 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Fraenkel:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Chao Xu:

Patch Set 5:

Thank you for the reviews. I'll address them the next week.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 231a5fe) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/198040 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Chao Xu:

Patch Set 5:

(4 comments)

@michael, I managed to simplify the code a lot. See the inline replies. PTAL. Thank you for the review!


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Fraenkel:

Patch Set 6:

(8 comments)

Glad there was some simplification to this.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: ee11e85) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/198040 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Chao Xu:

Patch Set 6:

(7 comments)

Thanks, Michael. PTAL.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Chao Xu:

Patch Set 7:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Fraenkel:

Patch Set 7:

(2 comments)

Just a few minor changes. Otherwise it looks much better.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: bce9e97) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/198040 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

After the connection has been idle for a while, periodic pings are sent
over the connection to check its health. Unhealthy connection is closed
and removed from the connection pool.

Fixes golang/go#31643
@gopherbot
Copy link
Contributor

This PR (HEAD: 36607fe) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/net/+/198040 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Chao Xu:

Patch Set 16:

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Russ Cox:

Patch Set 16: Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Russ Cox:

Patch Set 16:

(16 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Russ Cox:

Patch Set 16:

(10 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Russ Cox:

Patch Set 16:

(5 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Russ Cox:

Patch Set 16: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 16:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=74d0d8c3


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Russ Cox:

Patch Set 16:

If the trybots come back happy, this is OK to submit.

In the future, please mark resolved comments resolved, using Done or the checkbox. Thanks.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 16:

Build is still in progress...
This change failed on freebsd-amd64-12_0:
See https://storage.googleapis.com/go-build-log/f7f9c8f2/freebsd-amd64-12_0_77064e88.log

Other builds still in progress; subsequent failure notices suppressed until final report. Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 16: TryBot-Result-1

8 of 10 TryBots failed:
Failed on freebsd-amd64-12_0: https://storage.googleapis.com/go-build-log/f7f9c8f2/freebsd-amd64-12_0_77064e88.log
Failed on openbsd-amd64-64: https://storage.googleapis.com/go-build-log/f7f9c8f2/openbsd-amd64-64_22d84ceb.log
Failed on linux-amd64: https://storage.googleapis.com/go-build-log/f7f9c8f2/linux-amd64_ff74d76d.log
Failed on linux-386: https://storage.googleapis.com/go-build-log/f7f9c8f2/linux-386_e9ebcfbb.log
Failed on windows-amd64-2016: https://storage.googleapis.com/go-build-log/f7f9c8f2/windows-amd64-2016_b8298277.log
Failed on linux-amd64-race: https://storage.googleapis.com/go-build-log/f7f9c8f2/linux-amd64-race_56b60b96.log
Failed on windows-386-2008: https://storage.googleapis.com/go-build-log/f7f9c8f2/windows-386-2008_cadb21e4.log
Failed on android-amd64-emu: https://storage.googleapis.com/go-build-log/f7f9c8f2/android-amd64-emu_f86b2ffc.log

Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Andrew Bonventre:

Patch Set 17: Patch Set 16 was rebased


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Andrew Bonventre:

Patch Set 17: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 17:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=f8b7a1fa


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 17: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/198040.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request May 20, 2020
After the connection has been idle for a while, periodic pings are sent
over the connection to check its health. Unhealthy connection is closed
and removed from the connection pool.

Fixes golang/go#31643

Change-Id: Idbbc9cb2d3e26c39f84a33e945e482d41cd8583c
GitHub-Last-Rev: 36607fe
GitHub-Pull-Request: #55
Reviewed-on: https://go-review.googlesource.com/c/net/+/198040
Run-TryBot: Andrew Bonventre <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Russ Cox <[email protected]>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/198040 has been merged.

@torrescd
Copy link

@gopherbot backport please 1.13

@caesarxuchao
Copy link
Contributor Author

caesarxuchao commented Mar 20, 2021 via email

dteh pushed a commit to dteh/fhttp that referenced this pull request Jun 22, 2022
After the connection has been idle for a while, periodic pings are sent
over the connection to check its health. Unhealthy connection is closed
and removed from the connection pool.

Fixes golang/go#31643

Change-Id: Idbbc9cb2d3e26c39f84a33e945e482d41cd8583c
GitHub-Last-Rev: 36607fe185ce6684e9900403f82a298ad5567650
GitHub-Pull-Request: golang/net#55
Reviewed-on: https://go-review.googlesource.com/c/net/+/198040
Run-TryBot: Andrew Bonventre <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Russ Cox <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x/net/http2: make Transport occasionally send PING frames to server
4 participants