diff --git a/protocol/protocol.go b/protocol/protocol.go index 9923b63e7..4e1ace337 100644 --- a/protocol/protocol.go +++ b/protocol/protocol.go @@ -496,7 +496,9 @@ func (c *rawConnection) pingerLoop() { }() select { case ok := <-rc: - l.Debugln(c.id, "<- pong") + if debug { + l.Debugln(c.id, "<- pong") + } if !ok { c.close(fmt.Errorf("ping failure")) }