Skip to content

Commit 4e85cf7

Browse files
fix(audience-session): Log.Debug breadcrumb on double-Pause
The double-Pause guard silently returned. A studio seeing unexpected engagement numbers had no way to confirm a spurious lifecycle-bridge Pause was the cause. Log.Debug (gated by config.Debug) surfaces the event during integration without spamming production logs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 393973d commit 4e85cf7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Packages/Audience/Runtime/Core/Session.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ internal void Pause()
122122
// Keep the original anchor. Shifting forward shrinks Resume's
123123
// pauseDuration (and ComputeEngagedSecondsLocked's live pause
124124
// when End fires while paused), over-crediting engagement.
125-
if (_pausedAt.HasValue) return;
125+
if (_pausedAt.HasValue)
126+
{
127+
Log.Debug("Session: Pause while already paused — ignoring.");
128+
return;
129+
}
126130
_pausedAt = _getUtcNow();
127131
}
128132
}

0 commit comments

Comments
 (0)