From 2e695004be39bf58da7457551b8b83882627efe0 Mon Sep 17 00:00:00 2001 From: Anton Pirker Date: Fri, 22 Nov 2024 12:27:40 +0100 Subject: [PATCH] Cleanup --- sentry_sdk/integrations/wsgi.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sentry_sdk/integrations/wsgi.py b/sentry_sdk/integrations/wsgi.py index a4af733bc7..da59ba6d7c 100644 --- a/sentry_sdk/integrations/wsgi.py +++ b/sentry_sdk/integrations/wsgi.py @@ -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