From f741c8823c774983e9799aded64a85cb48b39669 Mon Sep 17 00:00:00 2001 From: Robinson Date: Tue, 15 Mar 2022 11:44:39 +0100 Subject: [PATCH] Fixed IPC client handshake timeout --- src/dorkbox/network/aeron/IpcMediaDriverConnection.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dorkbox/network/aeron/IpcMediaDriverConnection.kt b/src/dorkbox/network/aeron/IpcMediaDriverConnection.kt index 9dbae58d..c7070aae 100644 --- a/src/dorkbox/network/aeron/IpcMediaDriverConnection.kt +++ b/src/dorkbox/network/aeron/IpcMediaDriverConnection.kt @@ -30,7 +30,7 @@ internal open class IpcMediaDriverConnection(streamId: Int, val streamIdSubscription: Int, sessionId: Int, ) : - MediaDriverConnection(0, 0, streamId, sessionId, 1_000, true) { + MediaDriverConnection(0, 0, streamId, sessionId, 1, true) { var success: Boolean = false @@ -93,7 +93,7 @@ internal open class IpcMediaDriverConnection(streamId: Int, success = false // this will wait for the server to acknowledge the connection (all via aeron) - startTime = System.currentTimeMillis() + startTime = System.nanoTime() while (timoutInNanos == 0L || System.nanoTime() - startTime < timoutInNanos) { if (publication.isConnected) { success = true