Exception now properly thrown when a message cannot be sent.

This commit is contained in:
Robinson 2022-03-02 23:54:32 +01:00
parent f68418c27c
commit 7aaf06c7a5
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -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) {