File tree 1 file changed +5
-3
lines changed
rsocket-transports/ktor-tcp/src/commonMain/kotlin/io/rsocket/kotlin/transport/ktor/tcp
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2015-2024 the original author or authors.
2
+ * Copyright 2015-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -51,6 +51,8 @@ internal class TcpConnection(
51
51
}
52
52
}
53
53
}
54
+ }.invokeOnCompletion {
55
+ sendChannel.cancelWithCause(it)
54
56
}
55
57
launch {
56
58
socketConnection.input.apply {
@@ -65,10 +67,10 @@ internal class TcpConnection(
65
67
}
66
68
}
67
69
}
70
+ }.invokeOnCompletion {
71
+ receiveChannel.cancelWithCause(it)
68
72
}
69
73
coroutineContext.job.invokeOnCompletion {
70
- sendChannel.cancelWithCause(it)
71
- receiveChannel.cancelWithCause(it)
72
74
socketConnection.input.cancel(it)
73
75
socketConnection.output.close(it)
74
76
socketConnection.socket.close()
You can’t perform that action at this time.
0 commit comments