From 516fcce6b3d0160d4b4ae7c268c0bfcd17c25517 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 21 May 2023 11:39:49 +0100 Subject: [PATCH] Keepalives are needed to stop the connection inactivity timeout --- src/core/link_quic.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/link_quic.go b/src/core/link_quic.go index 0ada7e47..dd5d8818 100644 --- a/src/core/link_quic.go +++ b/src/core/link_quic.go @@ -6,6 +6,7 @@ import ( "fmt" "net" "net/url" + "time" "github.com/Arceliar/phony" "github.com/quic-go/quic-go" @@ -41,7 +42,9 @@ func (l *links) newLinkQUIC() *linkQUIC { links: l, tlsconfig: l.core.config.tls.Clone(), quicconfig: &quic.Config{ - KeepAlivePeriod: 0, + MaxIdleTimeout: time.Minute, + KeepAlivePeriod: time.Second * 20, + TokenStore: quic.NewLRUTokenStore(255, 255), }, } return lt