Skip to content

Commit aeb21d4

Browse files
committed
cancel job and close channel
1 parent 2a7581f commit aeb21d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StdioServerTransport.kt

+3
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ public class StdioServerTransport(
115115

116116
// Cancel reading job and close channel
117117
readingJob?.cancel() // ToDO("was cancel and join")
118+
sendingJob?.cancel()
119+
118120
readChannel.close()
121+
writeChannel.close()
119122
readBuffer.clear()
120123

121124
_onClose.invoke()

0 commit comments

Comments
 (0)