-
Notifications
You must be signed in to change notification settings - Fork 176
fix hang caused by StreamableHttpClientTransport (#226) #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix hang caused by StreamableHttpClientTransport (#226) #227
Conversation
e8e7c52 to
c0a435f
Compare
|
I just realized that at some point I removed the dispatcher I was talking about. |
2ba8aea to
f317041
Compare
|
I've just checked again that all tests on all platforms pass on my machine (except for browser, I couldn't get those to work). |
f317041 to
21a8076
Compare
21a8076 to
c423d1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
thanks for your contribution
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [io.modelcontextprotocol:kotlin-sdk-server](https://github.com/modelcontextprotocol/kotlin-sdk) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `0.7.0` -> `0.7.1` | | [io.modelcontextprotocol:kotlin-sdk-core](https://github.com/modelcontextprotocol/kotlin-sdk) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `0.7.0` -> `0.7.1` | | [com.autonomousapps.dependency-analysis](https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin) | plugin | misk/gradle/libs.versions.toml | gradle | patch | `3.0.2` -> `3.0.3` | | [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.33.9` -> `2.33.10` | | [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.33.9` -> `2.33.10` | | [software.amazon.awssdk:s3](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.33.9` -> `2.33.10` | | [software.amazon.awssdk:regions](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.33.9` -> `2.33.10` | | [software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.33.9` -> `2.33.10` | | [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.33.9` -> `2.33.10` | | [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.33.9` -> `2.33.10` | | [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.33.9` -> `2.33.10` | | [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) | dependencies | misk/gradle/libs.versions.toml | gradle | patch | `2.33.9` -> `2.33.10` | --- ### Release Notes <details> <summary>modelcontextprotocol/kotlin-sdk (io.modelcontextprotocol:kotlin-sdk-server)</summary> ### [`v0.7.1`](https://github.com/modelcontextprotocol/kotlin-sdk/releases/tag/0.7.1) [Compare Source](modelcontextprotocol/kotlin-sdk@0.7.0...0.7.1) ##### What's Changed - Bump io.github.oshai:kotlin-logging from 7.0.7 to 7.0.11 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​211](modelcontextprotocol/kotlin-sdk#211) - Bump org.jlleitschuh.gradle.ktlint from 13.0.0 to 13.1.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​241](modelcontextprotocol/kotlin-sdk#241) - Bump com.anthropic:anthropic-java from 0.8.0 to 2.6.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​246](modelcontextprotocol/kotlin-sdk#246) - Fix upload reports in GitHub actions by [@​skarpovdev](https://github.com/skarpovdev) in [#​264](modelcontextprotocol/kotlin-sdk#264) - Bump ktor from 3.2.3 to 3.3.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​265](modelcontextprotocol/kotlin-sdk#265) - fix hang caused by StreamableHttpClientTransport ([#​226](modelcontextprotocol/kotlin-sdk#226)) by [@​AdrianMiska](https://github.com/AdrianMiska) in [#​227](modelcontextprotocol/kotlin-sdk#227) - Bump kotlin from 2.2.0 to 2.2.10 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​230](modelcontextprotocol/kotlin-sdk#230) - Add module documentation and enhance Dokka configuration by [@​kpavlov](https://github.com/kpavlov) in [#​261](modelcontextprotocol/kotlin-sdk#261) - Mark `testMultipleClientParallel` as ignored due to flakiness by [@​devcrocod](https://github.com/devcrocod) in [#​267](modelcontextprotocol/kotlin-sdk#267) ##### New Contributors - [@​AdrianMiska](https://github.com/AdrianMiska) made their first contribution in [#​227](modelcontextprotocol/kotlin-sdk#227) **Full Changelog**: <modelcontextprotocol/kotlin-sdk@0.7.0...0.7.1> </details> <details> <summary>autonomousapps/dependency-analysis-android-gradle-plugin (com.autonomousapps.dependency-analysis)</summary> ### [`v3.0.3`](https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/blob/HEAD/CHANGELOG.md#Version-303) - \[Fix]: compare versions via `VersionNumber`, not raw strings. - \[Fix] Forcibly downgrade kotlin-stdlib to 2.0.21 for Gradle 8.11 support. </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: 5f728b0acc73a9742f56946b97f85ad1e3355442
Re-throw exceptions in
StreamableHttpClientTransportsoProtocoldoesn'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
Checklist
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.testwas 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 being tripped, even though that's not the point of the indefinite hang.