diff options
-rw-r--r-- | src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java b/src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java index c9e50e4..48b075d 100644 --- a/src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java +++ b/src/main/java/org/openslx/dnbd3/status/StatisticsGenerator.java @@ -79,8 +79,8 @@ public class StatisticsGenerator } } statusList.clear(); - output.servers.clear(); - newOutput.servers.clear(); + List<ServerStats> outServers = new ArrayList<ServerStats>(); + List<ServerStats> newOutServers = new ArrayList<ServerStats>(); for ( Future<Status> future : futureStatusList ) { Status status; try { @@ -100,7 +100,7 @@ public class StatisticsGenerator srv.serverCount = status.getServerCount(); srv.uptime = status.getUptime(); srv.timestamp = status.getTimestamp(); - output.servers.add( srv ); + outServers.add( srv ); srv = srv.clone(); srv.images = status.getImages(); srv.clients = status.getClients(); @@ -108,8 +108,10 @@ public class StatisticsGenerator // For older dnbd3-server srv.clientCount = srv.clients.size(); } - newOutput.servers.add( srv ); + newOutServers.add( srv ); } + output.servers = outServers; + newOutput.servers = newOutServers; newOutput.timestamp = output.timestamp = System.currentTimeMillis(); synchronized ( graph ) { graph.decay(); |