Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Nov 22, 2024
1 parent 2feb299 commit 2e69500
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions sentry_sdk/integrations/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,21 +304,14 @@ def __iter__(self):
finally:
with use_isolation_scope(self._isolation_scope):
with use_scope(self._current_scope):
# Close the Sentry transaction (it could be that response.close() is never called by the framework)
# This is done here to make sure the Transaction stays
# open until all streaming responses are done.
finish_running_transaction(self._current_scope)
finish_running_transaction()

def close(self):
# type: () -> None
with use_isolation_scope(self._isolation_scope):
with use_scope(self._current_scope):
try:
# Close the Sentry transaction
# This is done here to make sure the Transaction stays
# open until all streaming responses are done.
finish_running_transaction()

self._response.close() # type: ignore
except AttributeError:
pass
Expand Down

0 comments on commit 2e69500

Please sign in to comment.