changeset 856:8e9d0f8be7e3

bugfix
author Devel 1
date Wed, 24 Jan 2018 09:05:17 +0100
parents 0781ca929f46
children 4c5afb3d4b25
files stress-tester/src/main/java/com/passus/st/Main.java stress-tester/src/main/java/com/passus/st/Main2.java
diffstat 2 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/Main.java	Wed Jan 24 08:37:08 2018 +0100
+++ b/stress-tester/src/main/java/com/passus/st/Main.java	Wed Jan 24 09:05:17 2018 +0100
@@ -327,11 +327,13 @@
 
             client.stop();
             emitter.stop();
-            if (reporterDestination instanceof ReporterRemoteDestination) {
-                ReporterRemoteDestination reporterRemoteDestination = (ReporterRemoteDestination) reporterDestination;
-                System.out.println("Dropped reporter messages: " + reporterRemoteDestination.getDroppedMessages());
+            if (reporterDestination != null) {
+                if (reporterDestination instanceof ReporterRemoteDestination) {
+                    ReporterRemoteDestination reporterRemoteDestination = (ReporterRemoteDestination) reporterDestination;
+                    System.out.println("Dropped reporter messages: " + reporterRemoteDestination.getDroppedMessages());
+                }
+                reporterDestination.stop();
             }
-            reporterDestination.stop();
 
             if (summaryListener != null) {
                 summaryListener.close();
--- a/stress-tester/src/main/java/com/passus/st/Main2.java	Wed Jan 24 08:37:08 2018 +0100
+++ b/stress-tester/src/main/java/com/passus/st/Main2.java	Wed Jan 24 09:05:17 2018 +0100
@@ -348,11 +348,14 @@
 
             client.stop();
             emitter.stop();
-            if (reporterDestination instanceof ReporterRemoteDestination) {
-                ReporterRemoteDestination reporterRemoteDestination = (ReporterRemoteDestination) reporterDestination;
-                System.out.println("Dropped reporter messages: " + reporterRemoteDestination.getDroppedMessages());
+
+            if (reporterDestination != null) {
+                if (reporterDestination instanceof ReporterRemoteDestination) {
+                    ReporterRemoteDestination reporterRemoteDestination = (ReporterRemoteDestination) reporterDestination;
+                    System.out.println("Dropped reporter messages: " + reporterRemoteDestination.getDroppedMessages());
+                }
+                reporterDestination.stop();
             }
-            reporterDestination.stop();
 
             if (summaryListener != null) {
                 summaryListener.close();