summaryrefslogtreecommitdiffstats
path: root/lib/connections/quic_misc.go
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2022-08-03 15:43:26 +0200
committerGitHub <noreply@github.com>2022-08-03 15:43:26 +0200
commit209e68c1badf4398ef3aefd3c7bee7ffe3f20ab3 (patch)
tree5f11aa67d15e3f4fb2f53bec6a77647990cf408a /lib/connections/quic_misc.go
parentcc54488e559d0833f0c6ac64a8e5f73d6eb33296 (diff)
build: Update quic-go for Go 1.19 (#8483)
Also adds idle time and keepalive parameters because how this is configured has changed in the new package version. The values are those that seems like might already be default, if keep-alives were enabled, which is not obvious from the doc comments. Also, Go 1.19 gofmt reformatting of comments.
Diffstat (limited to 'lib/connections/quic_misc.go')
-rw-r--r--lib/connections/quic_misc.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/connections/quic_misc.go b/lib/connections/quic_misc.go
index c019509ce8..1e502e148f 100644
--- a/lib/connections/quic_misc.go
+++ b/lib/connections/quic_misc.go
@@ -13,6 +13,7 @@ import (
"crypto/tls"
"net"
"net/url"
+ "time"
"github.com/lucas-clemente/quic-go"
)
@@ -20,7 +21,8 @@ import (
var (
quicConfig = &quic.Config{
ConnectionIDLength: 4,
- KeepAlive: true,
+ MaxIdleTimeout: 30 * time.Second,
+ KeepAlivePeriod: 15 * time.Second,
}
)