Unrwap ExecutionException, use Duration. (#900)

This commit is contained in:
Andrzej Cichocki 2017-06-23 17:49:17 +01:00 committed by GitHub
parent a69178ca73
commit 27a8f6fc47

View File

@ -400,7 +400,7 @@ class ShutdownManager(private val executorService: ExecutorService) {
registeredShutdowns
}
}
val shutdowns = shutdownFutures.map { ErrorOr.catch { it.get(1, SECONDS) } }
val shutdowns = shutdownFutures.map { ErrorOr.catch { it.getOrThrow(1.seconds) } }
shutdowns.reversed().forEach { errorOrShutdown ->
errorOrShutdown.match(
onValue = { shutdown ->