peeking when debug is on

This commit is contained in:
Jae Kwon 2014-07-14 16:17:42 -07:00
parent f53e6d1a33
commit 087a7b9a31
1 changed files with 2 additions and 1 deletions

View File

@ -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))