Catch RejectedExecutionException on node shutdown

This commit is contained in:
Simon Willnauer 2013-08-08 13:10:13 +02:00
parent ef365098e7
commit 04b23a8fab
1 changed files with 22 additions and 17 deletions

View File

@ -38,6 +38,7 @@ import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.atomic.AtomicLong;
@ -292,6 +293,7 @@ public class TransportService extends AbstractLifecycleComponent<TransportServic
threadPool.generic().execute(new Runnable() {
@Override
public void run() {
try {
for (TransportConnectionListener connectionListener : connectionListeners) {
connectionListener.onNodeDisconnected(node);
}
@ -312,6 +314,9 @@ public class TransportService extends AbstractLifecycleComponent<TransportServic
}
}
}
} catch (RejectedExecutionException ex) {
logger.debug("Rejected execution on NodeDisconnected", ex);
}
}
});
}