From: Niels Erik G. Nielsen Date: Mon, 13 May 2013 16:09:13 +0000 (-0400) Subject: Gets the greater activeclients from stat or show X-Git-Tag: v0.0.7~108 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=facb2a046b7c69685d64964116e26702047704e7;p=mkjsf-moved-to-github.git Gets the greater activeclients from stat or show .. to keep polling until they are in synch --- 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 ""; }