mirror of
https://github.com/yggdrasil-network/yggdrasil-go
synced 2024-11-09 23:20:26 +03:00
Keepalives are needed to stop the connection inactivity timeout
This commit is contained in:
parent
d8dc6b2670
commit
516fcce6b3
@ -6,6 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/Arceliar/phony"
|
"github.com/Arceliar/phony"
|
||||||
"github.com/quic-go/quic-go"
|
"github.com/quic-go/quic-go"
|
||||||
@ -41,7 +42,9 @@ func (l *links) newLinkQUIC() *linkQUIC {
|
|||||||
links: l,
|
links: l,
|
||||||
tlsconfig: l.core.config.tls.Clone(),
|
tlsconfig: l.core.config.tls.Clone(),
|
||||||
quicconfig: &quic.Config{
|
quicconfig: &quic.Config{
|
||||||
KeepAlivePeriod: 0,
|
MaxIdleTimeout: time.Minute,
|
||||||
|
KeepAlivePeriod: time.Second * 20,
|
||||||
|
TokenStore: quic.NewLRUTokenStore(255, 255),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return lt
|
return lt
|
||||||
|
Loading…
Reference in New Issue
Block a user