fixed comments
This commit is contained in:
parent
e4721b4c7c
commit
4fc0cb7541
|
@ -619,8 +619,8 @@ open class Connection(connectionParameters: ConnectionParams<*>) {
|
||||||
sendSync.message = message
|
sendSync.message = message
|
||||||
sendSync.id = id
|
sendSync.id = id
|
||||||
|
|
||||||
// if there is no ping response EVER, it means that the connection is in a critically BAD state!
|
// if there is no sync 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
|
// eventually, all the ping/sync replies (or, in our case, the replies that have timed out) will
|
||||||
// become recycled.
|
// become recycled.
|
||||||
// Is it a memory-leak? No, because the memory will **EVENTUALLY** get freed.
|
// Is it a memory-leak? No, because the memory will **EVENTUALLY** get freed.
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ internal class ClientHandshakeDriver(
|
||||||
remotePort2: Int,
|
remotePort2: Int,
|
||||||
clientListenPort: Int,
|
clientListenPort: Int,
|
||||||
handshakeTimeoutNs: Long,
|
handshakeTimeoutNs: Long,
|
||||||
|
connectionTimoutInNs: Long,
|
||||||
reliable: Boolean,
|
reliable: Boolean,
|
||||||
tagName: String,
|
tagName: String,
|
||||||
logger: Logger
|
logger: Logger
|
||||||
|
@ -98,12 +99,22 @@ internal class ClientHandshakeDriver(
|
||||||
|
|
||||||
var pubSub: PubSub? = null
|
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) {
|
if (isUsingIPC) {
|
||||||
streamIdPub = config.ipcId
|
streamIdPub = config.ipcId
|
||||||
|
|
||||||
logInfo = "HANDSHAKE-IPC"
|
logInfo = "HANDSHAKE-IPC"
|
||||||
details = logInfo
|
details = logInfo
|
||||||
|
|
||||||
|
|
||||||
|
logger.info("Client connecting via IPC. $timeoutInfo")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
pubSub = buildIPC(
|
pubSub = buildIPC(
|
||||||
aeronDriver = aeronDriver,
|
aeronDriver = aeronDriver,
|
||||||
|
@ -150,6 +161,12 @@ internal class ClientHandshakeDriver(
|
||||||
streamIdPub = config.udpId
|
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(
|
pubSub = buildUDP(
|
||||||
aeronDriver = aeronDriver,
|
aeronDriver = aeronDriver,
|
||||||
handshakeTimeoutNs = handshakeTimeoutNs,
|
handshakeTimeoutNs = handshakeTimeoutNs,
|
||||||
|
|
Loading…
Reference in New Issue