From c94816f3de4ee0d564dbb40070e272c8f051888a Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Fri, 8 Nov 2024 18:41:54 +0200 Subject: [PATCH] fix style --- .../common/src/io/ktor/server/cio/backend/HttpServer.kt | 1 - .../common/src/io/ktor/server/testing/Utils.kt | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ktor-server/ktor-server-cio/common/src/io/ktor/server/cio/backend/HttpServer.kt b/ktor-server/ktor-server-cio/common/src/io/ktor/server/cio/backend/HttpServer.kt index da3eeabeac3..d83a63d8d24 100644 --- a/ktor-server/ktor-server-cio/common/src/io/ktor/server/cio/backend/HttpServer.kt +++ b/ktor-server/ktor-server-cio/common/src/io/ktor/server/cio/backend/HttpServer.kt @@ -39,7 +39,6 @@ public fun CoroutineScope.httpServer( val selector = SelectorManager(coroutineContext) val timeout = settings.connectionIdleTimeoutSeconds.seconds - val acceptJob = launch(serverJob + CoroutineName("accept-${settings.port}")) { aSocket(selector).tcp().bind(settings.host, settings.port) { reuseAddress = settings.reuseAddress diff --git a/ktor-server/ktor-server-test-host/common/src/io/ktor/server/testing/Utils.kt b/ktor-server/ktor-server-test-host/common/src/io/ktor/server/testing/Utils.kt index 60e0e314680..d96814f3302 100644 --- a/ktor-server/ktor-server-test-host/common/src/io/ktor/server/testing/Utils.kt +++ b/ktor-server/ktor-server-test-host/common/src/io/ktor/server/testing/Utils.kt @@ -63,7 +63,7 @@ internal fun CoroutineScope.socketTimeoutKiller(socketTimeoutMillis: Long, job: @OptIn(InternalAPI::class) internal fun Throwable.mapToKtor(data: HttpRequestData): Throwable = when { - this is NetworkSocketTimeoutException -> SocketTimeoutException(data, this) + this is NetworkSocketTimeoutException -> SocketTimeoutException(data, this) cause?.rootCause is NetworkSocketTimeoutException -> SocketTimeoutException(data, cause?.rootCause) - else -> this + else -> this }