Skip to content

Commit 4744817

Browse files
committed
ref(transport): Remove redundant background task set
GH-4582
1 parent 111861b commit 4744817

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

sentry_sdk/transport.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,6 @@ def __init__(self: Self, options: Dict[str, Any]) -> None:
594594
super().__init__(options)
595595
# Requires event loop at init time
596596
self.loop = asyncio.get_running_loop()
597-
self.background_tasks: set[asyncio.Task[None]] = set()
598597

599598
def _create_worker(self: Self, options: dict[str, Any]) -> Worker:
600599
return AsyncWorker(queue_size=options["transport_queue_size"])
@@ -792,9 +791,6 @@ def kill(self: Self) -> Optional[asyncio.Task[None]]: # type: ignore
792791

793792
logger.debug("Killing HTTP transport")
794793
self._worker.kill()
795-
for task in self.background_tasks:
796-
task.cancel()
797-
self.background_tasks.clear()
798794
try:
799795
# Return the pool cleanup task so caller can await it if needed
800796
return self.loop.create_task(self._pool.aclose()) # type: ignore

0 commit comments

Comments
 (0)