peer: display the src peer when logging read error

This commit is contained in:
Olaoluwa Osuntokun committed 2017-01-23 20:33:29 -08:00
1 parent 318cfb0080
commit 019edc9035
1 file changed
+2 -1
+2 -1
View File
@@ -359,7 +359,8 @@ out:
for atomic.LoadInt32(&p.disconnect) == 0 {
nextMsg, _, err := p.readNextMessage()
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) {
// If this is just a message we don't yet recognize,