add a AllowConnectionWindowIncrease config option

This commit is contained in:
Marten Seemann
2022-01-14 12:04:04 +04:00
parent f9904c7c45
commit bfd685faf2
4 changed files with 18 additions and 4 deletions

View File

@@ -506,7 +506,12 @@ func (s *session) preSetup() {
protocol.ByteCount(s.config.InitialConnectionReceiveWindow),
protocol.ByteCount(s.config.MaxConnectionReceiveWindow),
s.onHasConnectionWindowUpdate,
func(protocol.ByteCount) bool { return true },
func(size protocol.ByteCount) bool {
if s.config.AllowConnectionWindowIncrease == nil {
return true
}
return s.config.AllowConnectionWindowIncrease(s, int(size))
},
s.rttStats,
s.logger,
)