Browse Source

peeking when debug is on

pull/9/head
Jae Kwon 11 years ago
parent
commit
087a7b9a31
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      p2p/connection.go

+ 2
- 1
p2p/connection.go View File

@ -7,6 +7,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/op/go-logging"
. "github.com/tendermint/tendermint/binary" . "github.com/tendermint/tendermint/binary"
. "github.com/tendermint/tendermint/common" . "github.com/tendermint/tendermint/common"
) )
@ -190,7 +191,7 @@ func (c *Connection) recvHandler() {
FOR_LOOP: FOR_LOOP:
for { for {
if true {
if log.IsEnabledFor(logging.DEBUG) {
// peeking into bufReader // peeking into bufReader
numBytes := c.bufReader.Buffered() numBytes := c.bufReader.Buffered()
bytes, err := c.bufReader.Peek(MinInt(numBytes, 100)) bytes, err := c.bufReader.Peek(MinInt(numBytes, 100))


Loading…
Cancel
Save