Do not allow global timer to be stopped 46/109446/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Dec 2023 20:34:11 +0000 (21:34 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Dec 2023 20:34:11 +0000 (21:34 +0100)
We have a globally-shared instance, it should never be stopped via
Timer.stop(). Log a warning whenever that is atttempted.

Change-Id: Id29f3799024b826d2278bf95f75cc661f85ab8e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/OSGiGlobalTimer.java

index 87e941d7c8cb5e234a1e4cdb0a719e0f1476a41c..cb2eb708acf0eb1e5214809fee4f957b2b02097e 100644 (file)
@@ -56,6 +56,7 @@ public final class OSGiGlobalTimer implements Timer {
 
     @Override
     public Set<Timeout> stop() {
-        return delegate.stop();
+        LOG.warn("Attepted to stop global timer", new Throwable());
+        return Set.of();
     }
 }