mirror of
https://github.com/corda/corda.git
synced 2025-04-14 06:26:53 +00:00
Adding time limit for Driver address binding. (#1390)
* Adding time limit for Driver address binding. Otherwise it just hangs infinietly * Addressing review comments * Addressing review comments
This commit is contained in:
parent
4150316367
commit
7a6120970d
@ -370,8 +370,13 @@ fun addressMustBeBoundFuture(executorService: ScheduledExecutorService, hostAndP
|
||||
}
|
||||
}
|
||||
|
||||
fun addressMustNotBeBound(executorService: ScheduledExecutorService, hostAndPort: NetworkHostAndPort) {
|
||||
addressMustNotBeBoundFuture(executorService, hostAndPort).getOrThrow()
|
||||
/*
|
||||
* The default timeout value of 40 seconds have been chosen based on previous node shutdown time estimate.
|
||||
* It's been observed that nodes can take up to 30 seconds to shut down, so just to stay on the safe side the 40 seconds
|
||||
* timeout has been chosen.
|
||||
*/
|
||||
fun addressMustNotBeBound(executorService: ScheduledExecutorService, hostAndPort: NetworkHostAndPort, timeout: Duration = 40.seconds) {
|
||||
addressMustNotBeBoundFuture(executorService, hostAndPort).getOrThrow(timeout)
|
||||
}
|
||||
|
||||
fun addressMustNotBeBoundFuture(executorService: ScheduledExecutorService, hostAndPort: NetworkHostAndPort): CordaFuture<Unit> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user