Try to fix cache refresh issue on shutdown

This commit is contained in:
Gabriele C 2016-08-09 13:48:18 +02:00
parent d7427d18e7
commit ec3db792ed

View File

@ -155,14 +155,14 @@ public class CacheDataSource implements DataSource {
@Override @Override
public void close() { public void close() {
source.close();
cachedAuths.invalidateAll();
executorService.shutdown(); executorService.shutdown();
try { try {
executorService.awaitTermination(5, TimeUnit.SECONDS); executorService.awaitTermination(5, TimeUnit.SECONDS);
} catch (InterruptedException e) { } catch (InterruptedException e) {
ConsoleLogger.logException("Could not close executor service:", e); ConsoleLogger.logException("Could not close executor service:", e);
} }
cachedAuths.invalidateAll();
source.close();
} }
@Override @Override