You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransport.kt
+37-27Lines changed: 37 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -249,6 +249,7 @@ public class StreamableHttpServerTransport(
249
249
}
250
250
}
251
251
streamsMapping.clear()
252
+
requestToStreamMapping.clear()
252
253
requestToResponseMapping.clear()
253
254
_onClose()
254
255
}
@@ -380,7 +381,7 @@ public class StreamableHttpServerTransport(
380
381
)
381
382
return
382
383
}
383
-
session!!
384
+
val sseSession =session?: error("Server session can't be null for streaming GET requests")
384
385
385
386
val acceptHeader = call.request.header(HttpHeaders.Accept)
386
387
if (!acceptHeader.accepts(ContentType.Text.EventStream)) {
@@ -396,7 +397,7 @@ public class StreamableHttpServerTransport(
0 commit comments