Commit af56f9bf authored by Max's avatar Max
Browse files

Catch possible NPE if sync fails

parent 59493223
......@@ -118,6 +118,7 @@ public final class ComputingElement extends Thread {
logger.info("Time to sync with LDAP");
logger.info("Building new SiteMap.");
try {
config = ConfigUtils.getConfigFromLdap();
site = (String) config.get("site_accountname");
getSiteMap();
......@@ -127,6 +128,10 @@ public final class ComputingElement extends Thread {
siteMap.forEach((field, entry) -> {
logger.info("[" + field + ": " + entry + "]");
});
}
catch (Exception ex) {
logger.log(Level.WARNING, "Error syncing with LDAP: ", ex);
}
lastLdapRefresh = System.currentTimeMillis();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment