diff --git a/src/dorkbox/network/connection/Connection.kt b/src/dorkbox/network/connection/Connection.kt index 07d9845a..0171cb45 100644 --- a/src/dorkbox/network/connection/Connection.kt +++ b/src/dorkbox/network/connection/Connection.kt @@ -619,8 +619,8 @@ open class Connection(connectionParameters: ConnectionParams<*>) { sendSync.message = message sendSync.id = id - // if there is no ping response EVER, it means that the connection is in a critically BAD state! - // eventually, all the ping replies (or, in our case, the RMI replies that have timed out) will + // if there is no sync response EVER, it means that the connection is in a critically BAD state! + // eventually, all the ping/sync replies (or, in our case, the replies that have timed out) will // become recycled. // Is it a memory-leak? No, because the memory will **EVENTUALLY** get freed. diff --git a/src/dorkbox/network/handshake/ClientHandshakeDriver.kt b/src/dorkbox/network/handshake/ClientHandshakeDriver.kt index 4ddc7e8f..a9c3018b 100644 --- a/src/dorkbox/network/handshake/ClientHandshakeDriver.kt +++ b/src/dorkbox/network/handshake/ClientHandshakeDriver.kt @@ -64,6 +64,7 @@ internal class ClientHandshakeDriver( remotePort2: Int, clientListenPort: Int, handshakeTimeoutNs: Long, + connectionTimoutInNs: Long, reliable: Boolean, tagName: String, logger: Logger @@ -98,12 +99,22 @@ internal class ClientHandshakeDriver( var pubSub: PubSub? = null + val timeoutInfo = if (connectionTimoutInNs > 0L) { + "[Handshake: ${Sys.getTimePrettyFull(handshakeTimeoutNs)}, Max connection attempt: ${Sys.getTimePrettyFull(connectionTimoutInNs)}]" + } else { + "[Handshake: ${Sys.getTimePrettyFull(handshakeTimeoutNs)}, Max connection attempt: Unlimited]" + } + + if (isUsingIPC) { streamIdPub = config.ipcId logInfo = "HANDSHAKE-IPC" details = logInfo + + logger.info("Client connecting via IPC. $timeoutInfo") + try { pubSub = buildIPC( aeronDriver = aeronDriver, @@ -150,6 +161,12 @@ internal class ClientHandshakeDriver( streamIdPub = config.udpId + if (remoteAddress is Inet4Address) { + logger.info("Client connecting to IPv4 $remoteAddressString. $timeoutInfo") + } else { + logger.info("Client connecting to IPv6 $remoteAddressString. $timeoutInfo") + } + pubSub = buildUDP( aeronDriver = aeronDriver, handshakeTimeoutNs = handshakeTimeoutNs,