fix calculation of the time for the next keep alive

This commit is contained in:
Ari Mattila 2021-03-26 11:28:13 +02:00 committed by GitHub
parent 81d16a9903
commit e098ccd2b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -738,7 +738,7 @@ func (s *session) nextKeepAliveTime() time.Time {
if !s.config.KeepAlive || s.keepAlivePingSent || !s.firstAckElicitingPacketAfterIdleSentTime.IsZero() {
return time.Time{}
}
return s.lastPacketReceivedTime.Add(s.keepAliveInterval / 2)
return s.lastPacketReceivedTime.Add(s.keepAliveInterval)
}
func (s *session) maybeResetTimer() {