add exc handler

This commit is contained in:
Manfred Karrer 2015-11-16 18:28:59 +01:00
parent 89ca80364c
commit e90c1cabfe
2 changed files with 3 additions and 1 deletions

View File

@ -115,7 +115,7 @@ public abstract class NetworkNode implements MessageListener, ConnectionListener
newConnection.sendMessage(message);
return newConnection; // can take a while when using tor
} catch (Throwable throwable) {
if (!(throwable instanceof ConnectException || throwable instanceof IOException)) {
if (!(throwable instanceof ConnectException || throwable instanceof IOException || throwable instanceof TimeoutException)) {
throwable.printStackTrace();
log.error("Executing task failed. " + throwable.getMessage());
}

View File

@ -654,6 +654,8 @@ public class PeerGroup implements MessageListener, ConnectionListener {
reportedPeerAddresses.addAll(peerAddresses);
purgeReportedPeersIfExceeds();
}
printReportedPeers();
}
private void purgeReportedPeersIfExceeds() {