Skip to content

gh-155946: Fix SMTP connection leak in logging.SMTPHandler.emit() - #155947

Closed
americano212 wants to merge 1 commit into
python:mainfrom
americano212:smtphandler-connection-leak
Closed

gh-155946: Fix SMTP connection leak in logging.SMTPHandler.emit()#155947
americano212 wants to merge 1 commit into
python:mainfrom
americano212:smtphandler-connection-leak

Conversation

@americano212

@americano212 americano212 commented Aug 17, 2026

Copy link
Copy Markdown

No description provided.

Close the SMTP connection in a finally block so that it is released
even when sending the record fails, instead of leaving the cleanup to
the garbage collector.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VM1oocSfYBHUbXPiBWVeWg
@americano212
americano212 requested a review from vsajip as a code owner August 17, 2026 07:44
@python-cla-bot

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant