Skip to content

Commit b713bb5

Browse files
committed
Address PR feedback
1 parent ab2df97 commit b713bb5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class ReplayIntegration(
9595
this.gestureRecorderProvider = gestureRecorderProvider
9696
}
9797

98-
private var lastKnownConnectionStatus: ConnectionStatus = ConnectionStatus.UNKNOWN
98+
@Volatile private var lastKnownConnectionStatus: ConnectionStatus = ConnectionStatus.UNKNOWN
9999
private var debugMaskingEnabled: Boolean = false
100100
private lateinit var options: SentryOptions
101101
private var scopes: IScopes? = null
@@ -378,7 +378,8 @@ public class ReplayIntegration(
378378
private fun checkCanRecord() {
379379
if (
380380
captureStrategy is SessionCaptureStrategy &&
381-
(scopes?.rateLimiter?.isActiveForCategory(All) == true ||
381+
(lastKnownConnectionStatus == DISCONNECTED ||
382+
scopes?.rateLimiter?.isActiveForCategory(All) == true ||
382383
scopes?.rateLimiter?.isActiveForCategory(Replay) == true)
383384
) {
384385
pauseInternal()

0 commit comments

Comments
 (0)