3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-19 05:35:49 +00:00

PeerGroup: ignore another source of RejectedExecutionException during shutdown

This commit is contained in:
Mike Hearn 2015-02-02 17:29:50 +01:00
parent 653773d67a
commit 0d51cee24f

View File

@ -1039,7 +1039,7 @@ public class PeerGroup implements TransactionBroadcaster {
return inFlightRecalculations.get(mode); return inFlightRecalculations.get(mode);
inFlightRecalculations.put(mode, future); inFlightRecalculations.put(mode, future);
} }
executor.execute(new Runnable() { Runnable command = new Runnable() {
@Override @Override
public void run() { public void run() {
try { try {
@ -1089,7 +1089,12 @@ public class PeerGroup implements TransactionBroadcaster {
} }
future.set(result.filter); future.set(result.filter);
} }
}); };
try {
executor.execute(command);
} catch (RejectedExecutionException e) {
// Can happen during shutdown.
}
return future; return future;
} }