From 087a7b9a318cdac3d15e0db8d9800f82094b8b7c Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Mon, 14 Jul 2014 16:17:42 -0700 Subject: [PATCH] peeking when debug is on --- p2p/connection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/p2p/connection.go b/p2p/connection.go index ca3a1b17..3f40b5c1 100644 --- a/p2p/connection.go +++ b/p2p/connection.go @@ -7,6 +7,7 @@ import ( "sync/atomic" "time" + "github.com/op/go-logging" . "github.com/tendermint/tendermint/binary" . "github.com/tendermint/tendermint/common" ) @@ -190,7 +191,7 @@ func (c *Connection) recvHandler() { FOR_LOOP: for { - if true { + if log.IsEnabledFor(logging.DEBUG) { // peeking into bufReader numBytes := c.bufReader.Buffered() bytes, err := c.bufReader.Peek(MinInt(numBytes, 100))