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

x/net/http2: discrepancies in lost PING handling between Server and Transport #69963

Open
mmatczuk opened this issue Oct 21, 2024 · 1 comment · May be fixed by golang/net#229
Open

x/net/http2: discrepancies in lost PING handling between Server and Transport #69963

mmatczuk opened this issue Oct 21, 2024 · 1 comment · May be fixed by golang/net#229
Labels
NeedsFix The path to resolution is known, but the work has not been done.

Comments

@mmatczuk
Copy link

Go version

x/net v0.30.0

Output of go env in your module/workspace:

Not important.

What did you do?

I configured http2.Server with

  • ReadIdleTimeout
  • PingTimeout
  • CountError

and caused PING to be lost.

What did you see happen?

The newly added support for lost PING in server:

  • only logs lost ping in verbose mode while closes the underlying connection - IMO should be logged always
  • does not invoke CountError
if sc.pingSent {
    sc.vlogf("timeout waiting for PING response")
    sc.conn.Close()
    return
}

https://cs.opensource.google/go/x/net/+/refs/tags/v0.30.0:http2/server.go;l=1047

vs

func (cc *ClientConn) closeForLostPing() {
	err := errors.New("http2: client connection lost")
	if f := cc.t.CountError; f != nil {
		f("conn_close_lost_ping")
	}
	cc.closeForError(err)
}

https://cs.opensource.google/go/x/net/+/refs/tags/v0.30.0:http2/transport.go;l=1159

What did you expect to see?

I expect to see

  • ErrorLog called with lost ping message
  • CountError called with conn_close_lost_ping
@gabyhelp
Copy link

@neild neild added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants