Handle the timeout exception, which can happen if the scheduler overruns (e.g. during debugging, but also potentiallyu with slow callbacks).

This commit is contained in:
Matthew Nesbit 2016-11-07 09:56:38 +00:00
parent 86ea9f0082
commit 1c39780c22

View File

@ -96,6 +96,8 @@ fun Clock.awaitWithDeadline(deadline: Instant, future: Future<*> = GuavaSettable
// No need to take action as will fall out of the loop due to future.isDone
} catch(e: CancellationException) {
// No need to take action as will fall out of the loop due to future.isDone
} catch(e: TimeoutException) {
// No need to take action as will fall out of the loop due to future.isDone
}
}
subscription?.unsubscribe()