use of org.cryptomator.ui.util.DeferredCloser in project cryptomator by cryptomator.
the class CryptomatorModule method provideDeferredCloser.
@Provides
@Singleton
DeferredCloser provideDeferredCloser() {
DeferredCloser closer = new DeferredCloser();
Cryptomator.addShutdownTask(() -> {
try {
closer.close();
} catch (Exception e) {
LOG.error("Error during shutdown.", e);
}
});
return closer;
}
Aggregations