Skip to content

Commit

Permalink
fix: Safe-navigate to session flusher (#2396)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti authored Dec 5, 2024
1 parent 48f45e8 commit 3d2e5e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sentry-ruby/lib/sentry/hub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,11 @@ def end_session

return unless session
session.close
Sentry.session_flusher.add_session(session)

# NOTE: Under some circumstances, session_flusher nilified out of sync
# See: https://github.com/getsentry/sentry-ruby/issues/2378
# See: https://github.com/getsentry/sentry-ruby/pull/2396
Sentry.session_flusher&.add_session(session)
end

def with_session_tracking(&block)
Expand Down

0 comments on commit 3d2e5e6

Please sign in to comment.