kotlin-sdk/kotlin-sdk-client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Adrian Miska ee9f477d25
fix hang caused by StreamableHttpClientTransport (#226) (#227)
Re-throw exceptions in `StreamableHttpClientTransport` so `Protocol`
doesn't hang indefinitely.


## Motivation and Context
Fixes the issue described in #226

## How Has This Been Tested?
I've verified that my test case reproduces the error without my fix, and
verified with breakpoints that the hang occurred where I described it.

## Breaking Changes
None

## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [x] I have added appropriate error handling
- [ ] I have added or updated documentation as needed

## Additional context
I am unsure about the dispatcher I used for the real-time timeout here.
I could not get the test to work otherwise, as `kotlinx.coroutines.test`
was always tripping my timeout, with or without the fix. This is
seemingly unrelated to the test case though, as removing my timeout
results in the [timeout in
Protocol](6bae9874c0/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/Protocol.kt (L454))
being tripped, even though that's not the point of the indefinite hang.
2025-09-15 16:31:42 +02:00
..
api modularize sdk (#208) 2025-08-04 11:53:38 +02:00
src fix hang caused by StreamableHttpClientTransport (#226) (#227) 2025-09-15 16:31:42 +02:00
build.gradle.kts Remove dependency on CIO engine (#223) 2025-09-11 14:30:36 +03:00