if (e.getCause() instanceof EOFException) {
this.service = null;
logger.error("Lost connection", e);
} else {
logger.error("Communication error", e);
throw new DelegationException("Error occurred delegating to server", e);
}
} catch (Exception e) {
logger.error("Communication error", e);
throw new DelegationException("Error occurred delegating to server", e);
}
}
logger.info("Signalling connection thread to reconnect");
synchronized (keepAlive) {
keepAlive.notify();
}
throw new DelegationException("No connection to server");
}