limit Config.MaxIncoming{Uni}Streams to 2^60

This commit is contained in:
Marten Seemann
2020-08-11 10:44:24 +07:00
parent ce24f7e46f
commit 69df425318
5 changed files with 44 additions and 1 deletions

View File

@@ -242,10 +242,12 @@ type Config struct {
// If this value is zero, it will default to 1.5 MB for the server and 15 MB for the client.
MaxReceiveConnectionFlowControlWindow uint64
// MaxIncomingStreams is the maximum number of concurrent bidirectional streams that a peer is allowed to open.
// Values above 2^60 are invalid.
// If not set, it will default to 100.
// If set to a negative value, it doesn't allow any bidirectional streams.
MaxIncomingStreams int64
// MaxIncomingUniStreams is the maximum number of concurrent unidirectional streams that a peer is allowed to open.
// Values above 2^60 are invalid.
// If not set, it will default to 100.
// If set to a negative value, it doesn't allow any unidirectional streams.
MaxIncomingUniStreams int64