Changed close to suspending

This commit is contained in:
Robinson 2023-05-24 11:55:07 +02:00
parent 5cf41580fd
commit 6200c5e887
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 4 additions and 2 deletions

View File

@ -280,10 +280,12 @@ internal class ResponseManager(maxValuesInCache: Int = 65535, minimumValue: Int
return resultOrWaiter
}
fun close() {
suspend fun close() {
logger.info { "Closing the RMI manager" }
// wait for responses, or wait for timeouts!
while (rmiWaitersInUse.value > 0) {
Thread.sleep(100)
delay(100)
}
waiterCache.close()