From 3fa385c58a8c753d613ee252d27364193819960b Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Tue, 14 Apr 2026 09:48:33 -0400 Subject: [PATCH] fix(profiler): Stop nulling buffer on teardown Previously, teardown() set self.buffer = None which could cause issues if the buffer was still being accessed. Keep the buffer reference intact after teardown. Co-Authored-By: Claude Opus 4.6 (1M context) --- sentry_sdk/profiler/continuous_profiler.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sentry_sdk/profiler/continuous_profiler.py b/sentry_sdk/profiler/continuous_profiler.py index aeeae3fb1d..5a42785fdf 100644 --- a/sentry_sdk/profiler/continuous_profiler.py +++ b/sentry_sdk/profiler/continuous_profiler.py @@ -506,8 +506,6 @@ def teardown(self) -> None: self.thread.join() self.thread = None - self.buffer = None - class GeventContinuousScheduler(ContinuousScheduler): """ @@ -580,8 +578,6 @@ def teardown(self) -> None: self.thread.join() self.thread = None - self.buffer = None - PROFILE_BUFFER_SECONDS = 60