From 66873a3347ba429e7d97bb86cfd0e1aea5eeb65a Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Sat, 30 Nov 2024 09:14:20 +0200 Subject: [PATCH] fix QUIC implementation (#283) --- .../kotlin/io/rsocket/kotlin/test/SuspendTest.kt | 9 ++++++++- .../transport/netty/quic/NettyQuicStreamHandler.kt | 2 -- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/rsocket-test/src/commonMain/kotlin/io/rsocket/kotlin/test/SuspendTest.kt b/rsocket-test/src/commonMain/kotlin/io/rsocket/kotlin/test/SuspendTest.kt index 60e0277b..64d93454 100644 --- a/rsocket-test/src/commonMain/kotlin/io/rsocket/kotlin/test/SuspendTest.kt +++ b/rsocket-test/src/commonMain/kotlin/io/rsocket/kotlin/test/SuspendTest.kt @@ -24,7 +24,14 @@ import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds val TestExceptionHandler = CoroutineExceptionHandler { c, e -> - println("Error in $c -> ${e.stackTraceToString()}") + val message = buildString { + appendLine("TestExceptionHandler:") + appendLine(" context: $c") + appendLine(" cause: $e") + appendLine(" stackTrace:") + e.stackTraceToString().lines().forEach { appendLine(" $it") } + } + println(message) } interface SuspendTest { diff --git a/rsocket-transports/netty-quic/src/jvmMain/kotlin/io/rsocket/kotlin/transport/netty/quic/NettyQuicStreamHandler.kt b/rsocket-transports/netty-quic/src/jvmMain/kotlin/io/rsocket/kotlin/transport/netty/quic/NettyQuicStreamHandler.kt index e624c0b0..ba88d923 100644 --- a/rsocket-transports/netty-quic/src/jvmMain/kotlin/io/rsocket/kotlin/transport/netty/quic/NettyQuicStreamHandler.kt +++ b/rsocket-transports/netty-quic/src/jvmMain/kotlin/io/rsocket/kotlin/transport/netty/quic/NettyQuicStreamHandler.kt @@ -83,8 +83,6 @@ internal class NettyQuicStreamHandler( state.inbound.cancel() withContext(NonCancellable) { writerJob.join() - // TODO: what is the correct way to properly shutdown stream? - channel.shutdownInput().awaitFuture() channel.close().awaitFuture() } }