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); newConnection.sendMessage(message);
return newConnection; // can take a while when using tor return newConnection; // can take a while when using tor
} catch (Throwable throwable) { } catch (Throwable throwable) {
if (!(throwable instanceof ConnectException || throwable instanceof IOException)) { if (!(throwable instanceof ConnectException || throwable instanceof IOException || throwable instanceof TimeoutException)) {
throwable.printStackTrace(); throwable.printStackTrace();
log.error("Executing task failed. " + throwable.getMessage()); log.error("Executing task failed. " + throwable.getMessage());
} }

View file

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