Gets the greater activeclients from stat or show
authorNiels Erik G. Nielsen <nielserik@indexdata.com>
Mon, 13 May 2013 16:09:13 +0000 (12:09 -0400)
committerNiels Erik G. Nielsen <nielserik@indexdata.com>
Mon, 13 May 2013 16:09:13 +0000 (12:09 -0400)
.. to keep polling until they are in synch

src/main/java/com/indexdata/mkjsf/pazpar2/data/Responses.java

index 8e4078d..1999774 100644 (file)
@@ -142,9 +142,11 @@ public class Responses implements Serializable {
   }\r
   \r
   public String getActiveClients() {    \r
-    if (getShow()!=null) {\r
+    if (getShow()!=null && getShow().getActiveClients().length()>0) {\r
       logger.debug("Active clients: "+getShow().getActiveClients());\r
-      return getShow().getActiveClients();\r
+      return String.valueOf(\r
+                    Math.max(Integer.parseInt(getShow().getActiveClients()),\r
+                             getStat().getActiveClients()));\r
     } else {\r
       return "";\r
     }\r