driver.start/close are now reentrant

This commit is contained in:
Robinson 2023-08-09 22:12:18 -06:00
parent 90d218637c
commit 19b36bde9f
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 2 additions and 2 deletions

View File

@ -523,7 +523,7 @@ class AeronDriver private constructor(config: Configuration, val logger: KLogger
*
* @return true if we are successfully connected to the aeron client
*/
suspend fun start()= lock.withLock {
suspend fun start()= lock.withReentrantLock {
internal.start(logger)
}
@ -812,7 +812,7 @@ class AeronDriver private constructor(config: Configuration, val logger: KLogger
*
* @return true if the driver was successfully stopped.
*/
suspend fun close(): Boolean = lock.withLock {
suspend fun close(): Boolean = lock.withReentrantLock {
if (logEverything) {
internal.close(endPoint, logger)
} else {