mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 12:59:57 +00:00
TUN-6191: Update quic-go to v0.27.1 and with custom patch to allow keep alive period to be configurable
The idle period is set to 5sec. We now also ping every second since last activity. This makes the quic.Connection less prone to being closed with no network activity, since we send multiple pings per idle period, and thus a single packet loss cannot cause the problem.
This commit is contained in:
12
vendor/github.com/lucas-clemente/quic-go/mtu_discoverer.go
generated
vendored
12
vendor/github.com/lucas-clemente/quic-go/mtu_discoverer.go
generated
vendored
@@ -11,7 +11,6 @@ import (
|
||||
|
||||
type mtuDiscoverer interface {
|
||||
ShouldSendProbe(now time.Time) bool
|
||||
NextProbeTime() time.Time
|
||||
GetPing() (ping ackhandler.Frame, datagramSize protocol.ByteCount)
|
||||
}
|
||||
|
||||
@@ -53,16 +52,7 @@ func (f *mtuFinder) ShouldSendProbe(now time.Time) bool {
|
||||
if f.probeInFlight || f.done() {
|
||||
return false
|
||||
}
|
||||
return !now.Before(f.NextProbeTime())
|
||||
}
|
||||
|
||||
// NextProbeTime returns the time when the next probe packet should be sent.
|
||||
// It returns the zero value if no probe packet should be sent.
|
||||
func (f *mtuFinder) NextProbeTime() time.Time {
|
||||
if f.probeInFlight || f.done() {
|
||||
return time.Time{}
|
||||
}
|
||||
return f.lastProbeTime.Add(mtuProbeDelay * f.rttStats.SmoothedRTT())
|
||||
return !now.Before(f.lastProbeTime.Add(mtuProbeDelay * f.rttStats.SmoothedRTT()))
|
||||
}
|
||||
|
||||
func (f *mtuFinder) GetPing() (ackhandler.Frame, protocol.ByteCount) {
|
||||
|
Reference in New Issue
Block a user