Skip to content

Commit

Permalink
fix: Safe-navigate to session flusher
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Nov 7, 2024
1 parent ceba0da commit 7bf8c9e
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 7bf8c9e

Please sign in to comment.