diff --git a/build.gradle.kts b/build.gradle.kts index 58e66cc..34694b0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,7 +12,7 @@ plugins { } group = "io.newm" -version = "2.6.0-SNAPSHOT" +version = "2.6.1-SNAPSHOT" java.sourceCompatibility = JavaVersion.VERSION_21 java.targetCompatibility = JavaVersion.VERSION_21 diff --git a/src/main/kotlin/io/newm/kogmios/ClientImpl.kt b/src/main/kotlin/io/newm/kogmios/ClientImpl.kt index 5bc2762..6a72aa7 100644 --- a/src/main/kotlin/io/newm/kogmios/ClientImpl.kt +++ b/src/main/kotlin/io/newm/kogmios/ClientImpl.kt @@ -84,6 +84,7 @@ import java.io.IOException import java.math.BigInteger import java.util.concurrent.ConcurrentHashMap import kotlin.coroutines.CoroutineContext +import kotlin.coroutines.cancellation.CancellationException import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.DelicateCoroutinesApi @@ -335,6 +336,9 @@ internal class ClientImpl( result.complete(false) } } + } catch (e: CancellationException) { + // rethrow to continue coroutine cancellation chain + throw e } catch (e: Throwable) { log.error("Connection Error!", e) e.printStackTrace()