Skip to content

Commit 5bd1e15

Browse files
aranjansarvindbr8
andcommitted
Update internal/transport/http2_client.go
Co-authored-by: Arvind Bright <arvind.bright100@gmail.com>
1 parent 0c6bc03 commit 5bd1e15

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/transport/http2_client.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,9 +1002,8 @@ func (t *http2Client) Close(err error) {
10021002
t.kpDormancyCond.Signal()
10031003
}
10041004
t.mu.Unlock()
1005-
// The HTTP/2 spec mentions that a GOAWAY frame should be sent before a connection close. If this close() function
1006-
// ever starts to take in an HTTP/2 error code the peer will be able to get more information about the reason
1007-
// behind the connection close.
1005+
// Per HTTP/2 spec, a GOAWAY frame must be sent before closing the
1006+
// connection. See https://httpwg.org/specs/rfc7540.html#GOAWAY.
10081007
t.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte(fmt.Sprintf("client shutdown with: %v", err)), closeConnErr: err})
10091008
if t.writerDone != nil {
10101009
<-t.writerDone

0 commit comments

Comments
 (0)