From facb2a046b7c69685d64964116e26702047704e7 Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Mon, 13 May 2013 12:09:13 -0400 Subject: [PATCH] Gets the greater activeclients from stat or show .. to keep polling until they are in synch --- src/main/java/com/indexdata/mkjsf/pazpar2/data/Responses.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/data/Responses.java b/src/main/java/com/indexdata/mkjsf/pazpar2/data/Responses.java index 8e4078d..1999774 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/data/Responses.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/data/Responses.java @@ -142,9 +142,11 @@ public class Responses implements Serializable { } public String getActiveClients() { - if (getShow()!=null) { + if (getShow()!=null && getShow().getActiveClients().length()>0) { logger.debug("Active clients: "+getShow().getActiveClients()); - return getShow().getActiveClients(); + return String.valueOf( + Math.max(Integer.parseInt(getShow().getActiveClients()), + getStat().getActiveClients())); } else { return ""; } -- 1.7.10.4