Skip to content

Commit 7bf8c9e

Browse files
committed
fix: Safe-navigate to session flusher
1 parent ceba0da commit 7bf8c9e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sentry-ruby/lib/sentry/hub.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ def end_session
255255

256256
return unless session
257257
session.close
258-
Sentry.session_flusher.add_session(session)
258+
259+
# NOTE: Under some circumstances, session_flusher nilified out of sync
260+
# See: https://github.com/getsentry/sentry-ruby/issues/2378
261+
# See: https://github.com/getsentry/sentry-ruby/pull/2396
262+
Sentry.session_flusher&.add_session(session)
259263
end
260264

261265
def with_session_tracking(&block)

0 commit comments

Comments
 (0)