Skip to content

Commit 77e263d

Browse files
authored
NR-523372 added a check for off mode when a replay is paused so that we don't still send a harvest network request. (#597)
1 parent 6c603f7 commit 77e263d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Agent/SessionReplay/SessionReplayManager.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ public class SessionReplayManager: NSObject {
188188

189189
stop()
190190
harvest()
191+
sessionReplayMode = .off
191192
NRLOG_AGENT_DEBUG("Session replay paused via manual pauseReplay() API")
192193
return true
193194
}
@@ -236,6 +237,11 @@ public class SessionReplayManager: NSObject {
236237
self.harvestseconds = 0
237238
}
238239

240+
if sessionReplayMode == .off {
241+
NRLOG_AGENT_DEBUG("Skipping harvest in off mode.")
242+
return
243+
}
244+
239245
if sessionReplayMode == .error {
240246
NRLOG_AGENT_DEBUG("Skipping harvest in ERROR mode.")
241247
return

0 commit comments

Comments
 (0)