Skip to content

Commit

Permalink
transport: fix maxStreamID to align with http2 spec (#5948)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindbr8 committed Jan 18, 2023
1 parent 4e4d828 commit 9326362
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/transport/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ const (

// MaxStreamID is the upper bound for the stream ID before the current
// transport gracefully closes and new transport is created for subsequent RPCs.
// This is set to 75% of math.MaxUint32. It's exported so that tests can override it.
var MaxStreamID = uint32(3_221_225_472)
// This is set to 75% of 2^31-1. Streams are identified with an unsigned 31-bit
// integer. It's exported so that tests can override it.
var MaxStreamID = uint32(math.MaxInt32 * 3 / 4)

0 comments on commit 9326362

Please sign in to comment.