fix arming of keep-alive timer after sending PMTUD probe packets (#4716)

This commit is contained in:
Marten Seemann
2024-11-04 20:09:10 +08:00
committed by GitHub
parent 98de6aebf7
commit 955506aa3b

View File

@@ -689,7 +689,7 @@ func (s *connection) nextIdleTimeoutTime() time.Time {
// Time when the next keep-alive packet should be sent.
// It returns a zero time if no keep-alive should be sent.
func (s *connection) nextKeepAliveTime() time.Time {
if s.config.KeepAlivePeriod == 0 || s.keepAlivePingSent || !s.firstAckElicitingPacketAfterIdleSentTime.IsZero() {
if s.config.KeepAlivePeriod == 0 || s.keepAlivePingSent {
return time.Time{}
}
keepAliveInterval := max(s.keepAliveInterval, s.rttStats.PTO(true)*3/2)