ONOS-6864 Fix a DispatchLoop restart bug.

Change-Id: I7d789400daa51aad805565f65e9f2aa37a5cb9b3
diff --git a/core/net/src/main/java/org/onosproject/event/impl/CoreEventDispatcher.java b/core/net/src/main/java/org/onosproject/event/impl/CoreEventDispatcher.java
index f395736..cbcf1b4 100644
--- a/core/net/src/main/java/org/onosproject/event/impl/CoreEventDispatcher.java
+++ b/core/net/src/main/java/org/onosproject/event/impl/CoreEventDispatcher.java
@@ -215,6 +215,11 @@
             add(KILL_PILL);
         }
 
+        void restart() {
+            dispatchFuture.cancel(true);
+            dispatchFuture = executor.submit(this);
+        }
+
         // Monitors event sinks to make sure none take too long to execute.
         private class Watchdog extends TimerTask {
             @Override
@@ -231,9 +236,8 @@
 
                     // Cancel the old dispatch loop and submit a new one.
 
-                stop();
-                dispatchFuture.cancel(true);
-                dispatchFuture = executor.submit(this);
+                    stop();
+                    restart();
                 }
             }
         }