diff --git a/ktor-network/js/src/io/ktor/network/sockets/SocketTimeoutException.kt b/ktor-network/js/src/io/ktor/network/sockets/SocketTimeoutException.kt index 0cfcf6df0b1..7ddebd9ff93 100644 --- a/ktor-network/js/src/io/ktor/network/sockets/SocketTimeoutException.kt +++ b/ktor-network/js/src/io/ktor/network/sockets/SocketTimeoutException.kt @@ -6,4 +6,9 @@ package io.ktor.network.sockets import io.ktor.utils.io.errors.* -public actual class SocketTimeoutException actual constructor(message: String) : IOException(message) +public actual class SocketTimeoutException( + message: String, + cause: Throwable? +) : IOException(message, cause) { + public actual constructor(message: String) : this(message, null) +} diff --git a/ktor-network/posix/src/io/ktor/network/sockets/SocketTimeoutException.kt b/ktor-network/posix/src/io/ktor/network/sockets/SocketTimeoutException.kt index e9183f480d7..964906814c1 100644 --- a/ktor-network/posix/src/io/ktor/network/sockets/SocketTimeoutException.kt +++ b/ktor-network/posix/src/io/ktor/network/sockets/SocketTimeoutException.kt @@ -7,4 +7,9 @@ package io.ktor.network.sockets import io.ktor.utils.io.errors.* @Suppress("EXPECT_WITHOUT_ACTUAL") -public actual class SocketTimeoutException actual constructor(message: String) : IOException(message) +public actual class SocketTimeoutException( + message: String, + cause: Throwable? +) : IOException(message, cause) { + public actual constructor(message: String) : this(message, null) +}