File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
rsocket-transports/ktor-tcp/src/commonMain/kotlin/io/rsocket/kotlin/transport/ktor/tcp Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2015-2024 the original author or authors.
2+ * Copyright 2015-2025 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -51,6 +51,8 @@ internal class TcpConnection(
5151 }
5252 }
5353 }
54+ }.invokeOnCompletion {
55+ sendChannel.cancelWithCause(it)
5456 }
5557 launch {
5658 socketConnection.input.apply {
@@ -65,10 +67,10 @@ internal class TcpConnection(
6567 }
6668 }
6769 }
70+ }.invokeOnCompletion {
71+ receiveChannel.cancelWithCause(it)
6872 }
6973 coroutineContext.job.invokeOnCompletion {
70- sendChannel.cancelWithCause(it)
71- receiveChannel.cancelWithCause(it)
7274 socketConnection.input.cancel(it)
7375 socketConnection.output.close(it)
7476 socketConnection.socket.close()
You can’t perform that action at this time.
0 commit comments