|
@ -11,6 +11,7 @@ import ( |
|
|
crypto "github.com/tendermint/go-crypto" |
|
|
crypto "github.com/tendermint/go-crypto" |
|
|
wire "github.com/tendermint/go-wire" |
|
|
wire "github.com/tendermint/go-wire" |
|
|
cmn "github.com/tendermint/tmlibs/common" |
|
|
cmn "github.com/tendermint/tmlibs/common" |
|
|
|
|
|
"github.com/tendermint/tmlibs/log" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
// Peer is an interface representing a peer connected on a reactor.
|
|
|
// Peer is an interface representing a peer connected on a reactor.
|
|
@ -136,6 +137,11 @@ func newPeerFromConnAndConfig(rawConn net.Conn, outbound bool, reactorsByCh map[ |
|
|
return p, nil |
|
|
return p, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (p *peer) SetLogger(l log.Logger) { |
|
|
|
|
|
p.Logger = l |
|
|
|
|
|
p.mconn.SetLogger(l) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// CloseConn should be used when the peer was created, but never started.
|
|
|
// CloseConn should be used when the peer was created, but never started.
|
|
|
func (p *peer) CloseConn() { |
|
|
func (p *peer) CloseConn() { |
|
|
p.conn.Close() |
|
|
p.conn.Close() |
|
|