Skip to content

Commit 10e6545

Browse files
docs(session): Say why a terminal status clears the unhandled marker
end() already gives a terminal status precedence via its status == Ok guard, so the clearing is about keeping the flag honest: without it a crashed session serializes a marker claiming it did not terminate, and the public accessor reports true for it. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6e78a04 commit 10e6545

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎sentry/src/main/java/io/sentry/Session.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ public boolean update(
311311
boolean sessionHasBeenUpdated = false;
312312
if (status != null) {
313313
this.status = status;
314-
// the flag only decides how an Ok session is finalized, so an explicit terminal status
315-
// such as a crash or an ANR takes precedence over a non-terminating error.
314+
// a terminal status makes the flag meaningless, so drop it rather than serialize a crashed
315+
// session that claims it did not terminate
316316
if (status != State.Ok) {
317317
hasNonTerminatingUnhandledError = false;
318318
}

0 commit comments

Comments
 (0)