From 1ecce9c288a3ab9035ff33d09816a2c0eccb749c Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 7 Aug 2018 17:19:14 +0700 Subject: [PATCH] log keep alive packets --- session.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/session.go b/session.go index 65032f62f..314fc71ef 100644 --- a/session.go +++ b/session.go @@ -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) {