encode / uvicorn

An ASGI web server, for Python. 🦄
https://www.uvicorn.org/
BSD 3-Clause "New" or "Revised" License
8.11k stars 701 forks source link

Add `reason` support on WebSocketDisconnectEvent #2324

Closed frankie567 closed 2 weeks ago

frankie567 commented 1 month ago

Summary

In the ASGI specification repo, we recently talked about the lack of support for the reason field in the WebSocketDisconnectEvent. This will be likely added to the spec soon.

This PR adds support for this new addition. It doesn't need to be merged before the spec is officially modified, but we're already prepared here 😄

Checklist

frankie567 commented 2 weeks ago

Now that the ASGI spec change has been merged, I think we can go forward with this 😄