This release fixes a significant issue in ASGI applications. Previously, when receive was called after the request body completed, a dictionary corresponding to an empty body was always returned. This effectively prevents being able to poll for a client disconnect to issue cleanup logic since the poll would loop through these empty events forever, causing event loop starvation. This has been fixed so receive after the request body has been returned (more_body = False) now waits until client disconnect to complete with a disconnect event intead of request body events.
Additionally, an issue with websockets where the socket was closed too soon after server close has been fixed. This is only known to cause visible issues in certain cases on Windows.
🛠️ Bug fixes
- Wait for disconnect in ASGI receive after the request body by @wallacelim in #357
- Leave socket open after websocket close to finish handshake by @chokoswitch in #359
New Contributors
- @wallacelim made their first contribution in #357
Full Changelog: v1.5.0...v1.5.1