﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35496	ASGI Connection Leakage during Exception Logging	mietma		"Hi,

I am having trouble with Django ASGI leaving idle connections if exceptions are thrown. I narrowed it down to the logging of the exceptions.
The 'ExceptionReporter' opens new connections during the 'get_traceback_text()' method, which are then not closed. 
I made a workaround by implementing a custom ExceptionReporter which closes connections afterwards.

class CustomExceptionReporter(ExceptionReporter):
    def get_traceback_text(self):
        res = super().get_traceback_text()
        close_old_connections()
        return res

Is my approach correct or am I destroying something else? 

Best regards,
Matthias
"	Bug	new	Error reporting	4.2	Normal				Unreviewed	0	0	0	0	0	0
