From 7aaf06c7a52b7f1e990c91ee7735c02b6dfcf70b Mon Sep 17 00:00:00 2001 From: Robinson Date: Wed, 2 Mar 2022 23:54:32 +0100 Subject: [PATCH] Exception now properly thrown when a message cannot be sent. --- src/dorkbox/network/connection/EndPoint.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dorkbox/network/connection/EndPoint.kt b/src/dorkbox/network/connection/EndPoint.kt index 421c48ad..80a336b0 100644 --- a/src/dorkbox/network/connection/EndPoint.kt +++ b/src/dorkbox/network/connection/EndPoint.kt @@ -41,7 +41,12 @@ import io.aeron.Publication import io.aeron.driver.MediaDriver import io.aeron.logbuffer.Header import kotlinx.atomicfu.atomic -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.CoroutineStart +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.Job +import kotlinx.coroutines.launch +import kotlinx.coroutines.runBlocking import mu.KLogger import mu.KotlinLogging import org.agrona.DirectBuffer @@ -554,6 +559,7 @@ internal constructor(val type: Class<*>, logger.error("Aeron error!", exception) listenerManager.notifyError(connection, exception) + throw exception } } catch (e: Exception) { if (message is MethodResponse && message.result is Exception) {