diff --git a/src/dorkbox/network/Client.kt b/src/dorkbox/network/Client.kt index fa0eff89..4c8e2455 100644 --- a/src/dorkbox/network/Client.kt +++ b/src/dorkbox/network/Client.kt @@ -547,6 +547,7 @@ open class Client(config: ClientConfiguration = ClientC val startTime = System.nanoTime() var success = false while (!stopConnectOnShutdown && (connectionTimoutInNs == 0L || System.nanoTime() - startTime < connectionTimoutInNs)) { + logger.trace("Starting connect process...") if (isShutdown()) { resetOnError() diff --git a/src/dorkbox/network/connection/EndPoint.kt b/src/dorkbox/network/connection/EndPoint.kt index 8582bc0e..81fc5374 100644 --- a/src/dorkbox/network/connection/EndPoint.kt +++ b/src/dorkbox/network/connection/EndPoint.kt @@ -911,6 +911,7 @@ abstract class EndPoint private constructor(val type: C 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 @@ -1052,8 +1053,8 @@ abstract class EndPoint private constructor(val type: C shutdown = true // 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) + shutdownLatch.countDown() if (releaseWaitingThreads) { logger.trace("Counting down the close latch...")