Merge pull request #20 from edwardcapriolo/why-null

Why set to null
This commit is contained in:
edwardcapriolo
2016-04-20 14:06:31 -04:30
2 changed files with 8 additions and 3 deletions

View File

@ -188,8 +188,12 @@ public abstract class GossipManager extends Thread implements NotificationListen
public void shutdown() {
_gossipServiceRunning.set(false);
_gossipThreadExecutor.shutdown();
if (passiveGossipThread != null){
passiveGossipThread.shutdown();
}
if (activeGossipThread != null){
activeGossipThread.shutdown();
}
try {
boolean result = _gossipThreadExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS);
if (!result){

View File

@ -64,7 +64,6 @@ abstract public class PassiveGossipThread implements Runnable {
GossipService.LOGGER.debug("I am " + _gossipManager.getMyself());
} catch (SocketException ex) {
GossipService.LOGGER.warn(ex);
_server = null;
throw new RuntimeException(ex);
}
_keepRunning = new AtomicBoolean(true);
@ -139,7 +138,9 @@ abstract public class PassiveGossipThread implements Runnable {
}
public void shutdown() {
try {
_server.close();
} catch (RuntimeException ex){ }
}
/**