p2p/peer: Don't discard reason sent by Disconnect()

Peer.run() was discarding the reason for disconnection sent to the disc
channel by Disconnect()
This commit is contained in:
Guilherme Salgado 2018-04-24 22:23:01 +01:00
parent 86be91b3e2
commit eac60ff6e4

View file

@ -220,6 +220,7 @@ loop:
reason = discReasonForError(err) reason = discReasonForError(err)
break loop break loop
case err = <-p.disc: case err = <-p.disc:
reason = discReasonForError(err)
break loop break loop
} }
} }