Added more logging

This commit is contained in:
Robinson 2023-11-08 12:44:15 +01:00
parent 4bd77515d8
commit 2aebbe6116
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
2 changed files with 3 additions and 1 deletions

View File

@ -547,6 +547,7 @@ open class Client<CONNECTION : Connection>(config: ClientConfiguration = ClientC
val startTime = System.nanoTime() val startTime = System.nanoTime()
var success = false var success = false
while (!stopConnectOnShutdown && (connectionTimoutInNs == 0L || System.nanoTime() - startTime < connectionTimoutInNs)) { while (!stopConnectOnShutdown && (connectionTimoutInNs == 0L || System.nanoTime() - startTime < connectionTimoutInNs)) {
logger.trace("Starting connect process...")
if (isShutdown()) { if (isShutdown()) {
resetOnError() resetOnError()

View File

@ -911,6 +911,7 @@ abstract class EndPoint<CONNECTION : Connection> private constructor(val type: C
throw IllegalStateException("Unable to 'waitForClose()' while inside the network event dispatch, this will deadlock!") throw IllegalStateException("Unable to 'waitForClose()' while inside the network event dispatch, this will deadlock!")
} }
logger.trace("Waiting for endpoint to close...")
var origCloseLatch: CountDownLatch? = null var origCloseLatch: CountDownLatch? = null
@ -1052,8 +1053,8 @@ abstract class EndPoint<CONNECTION : Connection> private constructor(val type: C
shutdown = true shutdown = true
// the shutdown here must be in the launchSequentially lambda, this way we can guarantee the driver is closed before we move on // the shutdown here must be in the launchSequentially lambda, this way we can guarantee the driver is closed before we move on
shutdownLatch.countDown()
shutdownInProgress.lazySet(false) shutdownInProgress.lazySet(false)
shutdownLatch.countDown()
if (releaseWaitingThreads) { if (releaseWaitingThreads) {
logger.trace("Counting down the close latch...") logger.trace("Counting down the close latch...")