In Starlette, there are many codes that use receive to determine whether the connection is disconnected and continue to send. The current ASGIMiddleware is designed to save resources and handles two requests in the same thread, which will cause send to be blocked by receive.
fixes #58 #45
In Starlette, there are many codes that use receive to determine whether the connection is disconnected and continue to send. The current ASGIMiddleware is designed to save resources and handles two requests in the same thread, which will cause send to be blocked by receive.
https://github.com/encode/starlette/blob/5a1bec33f8d6a669a3670f51034de83292d19408/starlette/responses.py#L257-L265