fix quic config
This commit is contained in:
@ -77,6 +77,7 @@ func (l *quicListener) Init(md md.Metadata) (err error) {
|
||||
quic.Version1,
|
||||
quic.VersionDraft29,
|
||||
},
|
||||
MaxIncomingStreams: int64(l.md.maxStreams),
|
||||
}
|
||||
|
||||
tlsCfg := l.options.TLSConfig
|
||||
|
@ -16,6 +16,7 @@ type metadata struct {
|
||||
keepAlivePeriod time.Duration
|
||||
handshakeTimeout time.Duration
|
||||
maxIdleTimeout time.Duration
|
||||
maxStreams int
|
||||
|
||||
cipherKey []byte
|
||||
backlog int
|
||||
@ -27,6 +28,7 @@ func (l *quicListener) parseMetadata(md mdata.Metadata) (err error) {
|
||||
keepAlivePeriod = "ttl"
|
||||
handshakeTimeout = "handshakeTimeout"
|
||||
maxIdleTimeout = "maxIdleTimeout"
|
||||
maxStreams = "maxStreams"
|
||||
|
||||
backlog = "backlog"
|
||||
cipherKey = "cipherKey"
|
||||
@ -49,6 +51,7 @@ func (l *quicListener) parseMetadata(md mdata.Metadata) (err error) {
|
||||
}
|
||||
l.md.handshakeTimeout = mdutil.GetDuration(md, handshakeTimeout)
|
||||
l.md.maxIdleTimeout = mdutil.GetDuration(md, maxIdleTimeout)
|
||||
l.md.maxStreams = mdutil.GetInt(md, maxStreams)
|
||||
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user