forked from quic-go/quic-go
Merge pull request #1469 from lucas-clemente/log-keep-alives
log keep alive packets
This commit is contained in:
@@ -511,7 +511,8 @@ runLoop:
|
||||
pacingDeadline = s.sentPacketHandler.TimeUntilSend()
|
||||
}
|
||||
if s.config.KeepAlive && !s.keepAlivePingSent && s.handshakeComplete && time.Since(s.lastNetworkActivityTime) >= s.peerParams.IdleTimeout/2 {
|
||||
// send the PING frame since there is no activity in the session
|
||||
// send a PING frame since there is no activity in the session
|
||||
s.logger.Debugf("Sending a keep-alive ping to keep the connection alive.")
|
||||
s.packer.QueueControlFrame(&wire.PingFrame{})
|
||||
s.keepAlivePingSent = true
|
||||
} else if !pacingDeadline.IsZero() && now.Before(pacingDeadline) {
|
||||
|
||||
Reference in New Issue
Block a user