From 0a37fac794d7f2362f54afd19fac24e3b2e87107 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 28 May 2014 20:45:29 +0200 Subject: [PATCH] Catch escaped debug print --- protocol/protocol.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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")) }