diff --git a/src/dorkbox/network/Client.kt b/src/dorkbox/network/Client.kt index 97a57a85..94dda822 100644 --- a/src/dorkbox/network/Client.kt +++ b/src/dorkbox/network/Client.kt @@ -543,7 +543,7 @@ open class Client( // want to have 1 in-flight handshake, per connection attempt, during the aeron connection timeout // ALSO, we want to make sure we DO NOT approach the linger timeout! - sleep(aeronDriver.driverTimeout().coerceAtLeast(TimeUnit.NANOSECONDS.toSeconds(aeronDriver.getLingerNs()*2))) + sleep(aeronDriver.driverTimeout().coerceAtLeast(TimeUnit.NANOSECONDS.toSeconds(aeronDriver.getLingerNs() * 2))) if (e.cause is ServerException) { val cause = e.cause!! @@ -565,7 +565,7 @@ open class Client( // want to have 1 in-flight handshake, per connection attempt, during the aeron connection timeout // ALSO, we want to make sure we DO NOT approach the linger timeout! - sleep(aeronDriver.driverTimeout().coerceAtLeast(TimeUnit.NANOSECONDS.toSeconds(aeronDriver.getLingerNs()*2))) + sleep(aeronDriver.driverTimeout().coerceAtLeast(TimeUnit.NANOSECONDS.toSeconds(aeronDriver.getLingerNs() * 2))) listenerManager.notifyError(e) throw e @@ -644,7 +644,7 @@ open class Client( throw exception } - // every time we connect to a server, we have to reconfigure AND reassign the readKryo. + // every time we connect to a server, we have to reconfigure AND reassign the readKryos. readKryo = kryoConfiguredFromServer streamingReadKryo = serialization.initKryo() diff --git a/src/dorkbox/network/aeron/mediaDriver/ServerUdpPairedDriver.kt b/src/dorkbox/network/aeron/mediaDriver/ServerUdpPairedDriver.kt index f2f18ced..09966393 100644 --- a/src/dorkbox/network/aeron/mediaDriver/ServerUdpPairedDriver.kt +++ b/src/dorkbox/network/aeron/mediaDriver/ServerUdpPairedDriver.kt @@ -109,6 +109,8 @@ internal class ServerUdpPairedDriver( } } + val subscription = aeronDriver.addSubscription(subscriptionUri, streamId) + val remoteAddressString = if (isRemoteIpv4) { IPv4.toString(remoteAddress as Inet4Address) } else { @@ -119,6 +121,6 @@ internal class ServerUdpPairedDriver( this.success = true this.publication = publication - this.subscription = aeronDriver.addSubscription(subscriptionUri, streamId) + this.subscription = subscription } }