3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00

Fix a bug in Peer error logging, found by FindBugs.

This commit is contained in:
Mike Hearn 2013-02-21 15:41:33 +01:00
parent 3680c7f52f
commit 8540f879bd

View File

@ -212,7 +212,7 @@ public class Peer {
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {
String s;
PeerAddress addr = address.get();
s = address == null ? "?" : address.toString();
s = addr == null ? "?" : addr.toString();
if (e.getCause() instanceof ConnectException || e.getCause() instanceof IOException) {
// Short message for network errors
log.info(s + " - " + e.getCause().getMessage());