Merged in mnesbit-cleanup-scheduler-fix (pull request #453)

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 15:21:41 +00:00
commit 68506984a3

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()