peer: display the src peer when logging read error

This commit is contained in:
Olaoluwa Osuntokun 2017-01-23 20:33:18 -08:00
parent 318cfb0080
commit 019edc9035
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -359,7 +359,8 @@ out:
for atomic.LoadInt32(&p.disconnect) == 0 { for atomic.LoadInt32(&p.disconnect) == 0 {
nextMsg, _, err := p.readNextMessage() nextMsg, _, err := p.readNextMessage()
if err != nil { if err != nil {
peerLog.Infof("unable to read message: %v", err) peerLog.Infof("unable to read message from %v: %v",
p, err)
switch err.(type) { switch err.(type) {
// If this is just a message we don't yet recognize, // If this is just a message we don't yet recognize,