Skip to content

Commit dffaae0

Browse files
committed
final fix
1 parent e42c588 commit dffaae0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/transport/http2_client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,9 @@ func (t *http2Client) getPeer() *peer.Peer {
524524
// OutgoingGoAwayHandler writes a GOAWAY to the connection. Always returns (false, err) as we want the GoAway
525525
// to be the last frame loopy writes to the transport.
526526
func (t *http2Client) outgoingGoAwayHandler(g *goAway) (bool, error) {
527-
if err := t.framer.fr.WriteGoAway(math.MaxInt32*3/4, http2.ErrCodeNo, g.debugData); err != nil {
527+
t.mu.Lock()
528+
defer t.mu.Unlock()
529+
if err := t.framer.fr.WriteGoAway(t.nextID-2, http2.ErrCodeNo, g.debugData); err != nil {
528530
return false, err
529531
}
530532
return false, g.closeConn

0 commit comments

Comments
 (0)