Skip to content

Commit 9fbb112

Browse files
authored
fix(replay): Avoid deadlock when pausing replay if no connection (#4788)
1 parent 96449e8 commit 9fbb112

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CHANGELOG.md

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

77
- Use logger from options for JVM profiler ([#4771](https://github.com/getsentry/sentry-java/pull/4771))
8+
- Session Replay: Avoid deadlock when pausing replay if no connection ([#4788](https://github.com/getsentry/sentry-java/pull/4788))
89

910
### Miscellaneous
1011

sentry-android-replay/src/main/java/io/sentry/android/replay/ReplayIntegration.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,15 +307,13 @@ public class ReplayIntegration(
307307
scopes?.configureScope { screen = it.screen?.substringAfterLast('.') }
308308
captureStrategy?.onScreenshotRecorded(bitmap) { frameTimeStamp ->
309309
addFrame(bitmap, frameTimeStamp, screen)
310-
checkCanRecord()
311310
}
311+
checkCanRecord()
312312
}
313313

314314
override fun onScreenshotRecorded(screenshot: File, frameTimestamp: Long) {
315-
captureStrategy?.onScreenshotRecorded { _ ->
316-
addFrame(screenshot, frameTimestamp)
317-
checkCanRecord()
318-
}
315+
captureStrategy?.onScreenshotRecorded { _ -> addFrame(screenshot, frameTimestamp) }
316+
checkCanRecord()
319317
}
320318

321319
override fun close() {

0 commit comments

Comments
 (0)