--- miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/web/StatusListener.java 2011/12/23 10:29:00 1674 +++ miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/web/StatusListener.java 2011/12/28 13:20:43 1675 @@ -48,14 +48,17 @@ } String xml; - long now = System.currentTimeMillis(); - if ( (now-cachedTime) > 5000) { - xml = buildXML(); - cachedXml = xml; - cachedTime = now; - } else { - xml = cachedXml; - } + + synchronized(this) { //is this necessary ? + long now = System.currentTimeMillis(); + if ( (now-cachedTime) > 5000) { + xml = buildXML(); + cachedXml = xml; + cachedTime = now; + } else { + xml = cachedXml; + } + } event.setResponse(xml);