Skip to content

Commit 8f0dc10

Browse files
markushiclaude
andauthored
fix(okhttp): keep the wrapped EventListener per Call (#6003)
* fix(okhttp): keep the wrapped EventListener per Call Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: add changelog entry Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * refactor(okhttp): look up the wrapped EventListener once per callback Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(okhttp): delegate canceled() outside of the call window * fix(okhttp): bind out-of-window cancels to the listener of their call * fix(okhttp): drop out-of-window cancels instead of creating a listener for them * fix(okhttp): avoid computeIfAbsent to keep Android API 21 compatibility * Fix Changelog * docs(okhttp): document that canceled() is not always delegated * docs(okhttp): note the deliberate canceled() deviation in the delegation tests --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 1511066 commit 8f0dc10

5 files changed

Lines changed: 360 additions & 39 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Fixes
66

77
- Disable URL caching when reading `META-INF/MANIFEST.MF` files during version detection so that the SDK no longer keeps jar file handles open for the life of the process ([#6124](https://github.com/getsentry/sentry-java/pull/6124)
8+
- Keep the `EventListener` wrapped by `SentryOkHttpEventListener` per `Call` ([#6003](https://github.com/getsentry/sentry-java/pull/6003))
89

910
## 8.57.0
1011

‎sentry-okhttp/build.gradle.kts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ dependencies {
3838
testImplementation(libs.mockito.inline)
3939
testImplementation(libs.okhttp)
4040
testImplementation(libs.okhttp.mockwebserver)
41+
testImplementation(libs.google.truth)
4142
}
4243

4344
buildConfig {

0 commit comments

Comments
 (0)