Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Nov 19, 2024
1 parent a614fc6 commit 24be3d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sentry_sdk/integrations/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ def __iter__(self):
try:
chunk = next(iterator)
except StopIteration:
# 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)
break
except BaseException:
reraise(*_capture_exception())
Expand Down

0 comments on commit 24be3d3

Please sign in to comment.