We have a few endpoints behind the WSGIMiddleware. We noticed that with uvicorn upgrade to 0.28.0 it introduced a new ClientDisconnected exception that is now getting into the flow. It seems that WSGIMiddleware is not catching it / handling it and the request appears as if it never completed as our outer ASGI middleware is observing.
Repro is to have a flask app behind WSGIMiddleware to do something slow and then make a request and cancel it before the flask endpoint can return a response. We can then observe that the middleware app awaitable is never completing, resources keep piling up.
We have a few endpoints behind the WSGIMiddleware. We noticed that with uvicorn upgrade to 0.28.0 it introduced a new ClientDisconnected exception that is now getting into the flow. It seems that WSGIMiddleware is not catching it / handling it and the request appears as if it never completed as our outer ASGI middleware is observing.
Repro is to have a flask app behind WSGIMiddleware to do something slow and then make a request and cancel it before the flask endpoint can return a response. We can then observe that the middleware app awaitable is never completing, resources keep piling up.