Connection retries are SLIGHTLY slower than the aeron driver timeout.
This commit is contained in:
parent
9073769e15
commit
72b95b5cbe
@ -493,7 +493,8 @@ open class Client<CONNECTION : Connection>(
|
||||
aeronDriver.start()
|
||||
|
||||
// short delay, since it failed we want to limit the retry rate to something slower than "as fast as the CPU can do it"
|
||||
delay(500)
|
||||
// we also want to go at SLIGHTLY slower that the aeron driver timeout frequency, this way - if there are connection or handshake issues, the server has the chance to expire the connections.
|
||||
delay(aeronDriver.driverTimeout()+1)
|
||||
if (logger.isTraceEnabled) {
|
||||
logger.trace(e) { "Unable to connect to '$remoteAddressString', retrying..." }
|
||||
} else {
|
||||
|
@ -488,6 +488,14 @@ class AeronDriver(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the aeron driver timeout
|
||||
*/
|
||||
fun driverTimeout(): Long {
|
||||
return context.driverTimeout
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the aeron media driver log file for a specific publication. This should be removed when a publication is closed (but is not always!)
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user