changeset 568:e573828e24e5

ScheduledMetricsCollector bugfix
author Devel 2
date Tue, 26 Sep 2017 16:14:51 +0200
parents 9b42aa39f460
children c366887ec63e
files stress-tester/src/main/java/com/passus/st/metric/ScheduledMetricsCollector.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/metric/ScheduledMetricsCollector.java	Tue Sep 26 14:15:04 2017 +0200
+++ b/stress-tester/src/main/java/com/passus/st/metric/ScheduledMetricsCollector.java	Tue Sep 26 16:14:51 2017 +0200
@@ -111,8 +111,10 @@
 
         synchronized (this) {
             flush(true);
-            scheduledTimerService.stop();
-            scheduledTimerService = null;
+            if (scheduledTimerService != null) {
+                scheduledTimerService.stop();
+                scheduledTimerService = null;
+            }
             timeWindow.clear();
         }
     }