Skip to content

Commit

Permalink
Call close on at_exit
Browse files Browse the repository at this point in the history
  • Loading branch information
sl0thentr0py committed Jul 19, 2022
1 parent b3bdc48 commit eb48be2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sentry-ruby/lib/sentry-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ def init(&block)
exception_locals_tp.enable
end

at_exit do
@session_flusher&.kill
@background_worker&.shutdown
end
at_exit { close }
end

# Flushes pending events and cleans up SDK state.
Expand All @@ -234,7 +231,7 @@ def close
@session_flusher = nil
end

if configuration.capture_exception_frame_locals
if configuration&.capture_exception_frame_locals
exception_locals_tp.disable
end

Expand Down

0 comments on commit eb48be2

Please sign in to comment.