Skip to content

Commit 0f761cc

Browse files
committed
fix(replay): Avoid deadlock when pausing replay if no connection
1 parent 14ff5ee commit 0f761cc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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)