upgrade quic-go

This commit is contained in:
ginuerzh
2022-08-18 13:12:11 +08:00
parent f3f3acd4e1
commit bd60c2cf14
12 changed files with 53 additions and 50 deletions

View File

@ -59,7 +59,7 @@ func (l *icmpListener) Init(md md.Metadata) (err error) {
conn = admission.WrapPacketConn(l.options.Admission, conn)
config := &quic.Config{
KeepAlive: l.md.keepAlive,
KeepAlivePeriod: l.md.keepAlive,
HandshakeIdleTimeout: l.md.handshakeTimeout,
MaxIdleTimeout: l.md.maxIdleTimeout,
Versions: []quic.VersionNumber{

View File

@ -12,7 +12,7 @@ const (
)
type metadata struct {
keepAlive bool
keepAlive time.Duration
handshakeTimeout time.Duration
maxIdleTimeout time.Duration
@ -34,7 +34,7 @@ func (l *icmpListener) parseMetadata(md mdata.Metadata) (err error) {
l.md.backlog = defaultBacklog
}
l.md.keepAlive = mdx.GetBool(md, keepAlive)
l.md.keepAlive = mdx.GetDuration(md, keepAlive)
l.md.handshakeTimeout = mdx.GetDuration(md, handshakeTimeout)
l.md.maxIdleTimeout = mdx.GetDuration(md, maxIdleTimeout)

View File

@ -68,7 +68,7 @@ func (l *quicListener) Init(md md.Metadata) (err error) {
}
config := &quic.Config{
KeepAlive: l.md.keepAlive,
KeepAlivePeriod: l.md.keepAlive,
HandshakeIdleTimeout: l.md.handshakeTimeout,
MaxIdleTimeout: l.md.maxIdleTimeout,
Versions: []quic.VersionNumber{

View File

@ -12,7 +12,7 @@ const (
)
type metadata struct {
keepAlive bool
keepAlive time.Duration
handshakeTimeout time.Duration
maxIdleTimeout time.Duration
@ -39,7 +39,7 @@ func (l *quicListener) parseMetadata(md mdata.Metadata) (err error) {
l.md.cipherKey = []byte(key)
}
l.md.keepAlive = mdx.GetBool(md, keepAlive)
l.md.keepAlive = mdx.GetDuration(md, keepAlive)
l.md.handshakeTimeout = mdx.GetDuration(md, handshakeTimeout)
l.md.maxIdleTimeout = mdx.GetDuration(md, maxIdleTimeout)