diff --git a/README.md b/README.md index eecaf0a..f4e0f89 100755 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ buildscript { } dependencies { - classpath "dev.icerock.moko:network-generator:0.21.1" + classpath "dev.icerock.moko:network-generator:0.21.2" } } @@ -53,10 +53,10 @@ project build.gradle apply plugin: "dev.icerock.mobile.multiplatform-network-generator" dependencies { - commonMainApi("dev.icerock.moko:network:0.21.1") - commonMainApi("dev.icerock.moko:network-engine:0.21.1") // configured HttpClientEngine - commonMainApi("dev.icerock.moko:network-bignum:0.21.1") // kbignum serializer - commonMainApi("dev.icerock.moko:network-errors:0.21.1") // moko-errors integration + commonMainApi("dev.icerock.moko:network:0.21.2") + commonMainApi("dev.icerock.moko:network-engine:0.21.2") // configured HttpClientEngine + commonMainApi("dev.icerock.moko:network-bignum:0.21.2") // kbignum serializer + commonMainApi("dev.icerock.moko:network-errors:0.21.2") // moko-errors integration } ``` diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9e87337..7ac0147 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -20,7 +20,7 @@ mokoResourcesVersion = "0.21.2" mokoMvvmVersion = "0.16.0" mokoErrorsVersion = "0.7.0" mokoTestVersion = "0.6.1" -mokoNetworkVersion = "0.21.1" +mokoNetworkVersion = "0.21.2" # tests espressoCoreVersion = "3.5.1" diff --git a/network/src/commonJvmAndroid/kotlin/dev/icerock/moko/network/isNetworkConnectionError.kt b/network/src/commonJvmAndroid/kotlin/dev/icerock/moko/network/isNetworkConnectionError.kt index c3c5e51..37a3a13 100644 --- a/network/src/commonJvmAndroid/kotlin/dev/icerock/moko/network/isNetworkConnectionError.kt +++ b/network/src/commonJvmAndroid/kotlin/dev/icerock/moko/network/isNetworkConnectionError.kt @@ -7,6 +7,7 @@ package dev.icerock.moko.network import java.net.ConnectException +import java.net.SocketException import java.net.SocketTimeoutException import java.net.UnknownHostException import java.util.concurrent.TimeoutException @@ -14,6 +15,7 @@ import java.util.concurrent.TimeoutException actual fun Throwable.isNetworkConnectionError(): Boolean { return when (this) { is ConnectException, + is SocketException, is SocketTimeoutException, is TimeoutException, is UnknownHostException -> true