From 770dfc0a73897f445312219d2045c75bbaccb3a9 Mon Sep 17 00:00:00 2001 From: Shreck Ye Date: Tue, 29 Oct 2024 04:59:25 +0800 Subject: [PATCH] Update the "Connection reset" exception to the io_uring one that's ignored in logging --- .../vertx-web-kotlinx/src/main/kotlin/MainVerticle.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/MainVerticle.kt b/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/MainVerticle.kt index 25a6fd1ba51..8210d82f5fd 100644 --- a/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/MainVerticle.kt +++ b/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/MainVerticle.kt @@ -22,7 +22,6 @@ import kotlinx.html.stream.appendHTML import kotlinx.serialization.Serializable import kotlinx.serialization.SerializationStrategy import kotlinx.serialization.json.Json -import java.net.SocketException import java.time.ZonedDateTime import java.time.format.DateTimeFormatter @@ -82,8 +81,12 @@ class MainVerticle(val hasDb: Boolean) : CoroutineVerticle() { .requestHandler(Router.router(vertx).apply { routes() }) .exceptionHandler { // wrk resets the connections when benchmarking is finished. - if ((it is NativeIoException && it.message == "recvAddress(..) failed: Connection reset by peer") - || (it is SocketException && it.message == "Connection reset") + if ( + // for epoll + /*(it is NativeIoException && it.message == "recvAddress(..) failed: Connection reset by peer") + || (it is SocketException && it.message == "Connection reset")*/ + // for io_uring + it is NativeIoException && it.message == "io_uring read(..) failed: Connection reset by peer" ) return@exceptionHandler