Prevent unhandled exception if the executor is already shut down.

Change-Id: I63b2f093fea90d99c85cfe8ffa2a264eee56d981
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/WorkPartitionManager.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/WorkPartitionManager.java
index b06fe6b..288a485 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/WorkPartitionManager.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/WorkPartitionManager.java
@@ -37,6 +37,7 @@
 import java.util.List;
 import java.util.Objects;
 import java.util.concurrent.Executors;
+import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -226,7 +227,12 @@
             }
 
             if (event.type() == LeadershipEvent.Type.CANDIDATES_CHANGED) {
-                scheduleRebalance(0);
+                try {
+                    scheduleRebalance(0);
+                } catch (RejectedExecutionException ree) {
+                    // Queue was already shut down
+                    log.trace("executor already shut down", ree);
+                }
             }
         }
     }