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
public void close() {
source.close();
cachedAuths.invalidateAll();
executorService.shutdown();
try {
executorService.awaitTermination(5, TimeUnit.SECONDS);
} catch (InterruptedException e) {
ConsoleLogger.logException("Could not close executor service:", e);
}
cachedAuths.invalidateAll();
source.close();
}
@Override