Skip to content

Commit 937883c

Browse files
Do not log from the finalize guard
The first teardown nulls log.check, so a second call cannot log through the adapter -- which is the very hazard this change is fixing elsewhere. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 85b133b commit 937883c

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

postgres/datadog_checks/postgres/postgres.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,6 @@ def _finalize(self):
541541
"""Tear down check state. Runs at most once, and never while check() is executing."""
542542
with self._cancel_lock:
543543
if self._finalized:
544-
self.log.debug("Check already finalized, nothing to tear down")
545544
return
546545
self._finalized = True
547546
self.log.debug("Finalizing check: closing connections and clearing state")

0 commit comments

Comments
 (0)