Bug: Missing WebSocket Connection State Validation on Close and Message Send Operations #3848
Open
4 tasks done
Labels
Bug 🐛
This is something that is not working as expected
Description
The current WebSocket implementation in Litestar lacks connection state validation for critical operations. When attempting to close a connection, there is no check to verify if the connection has already been closed. Similarly, when sending messages, the implementation doesn't validate whether the connection is still active before attempting transmission. This can lead to attempts to perform operations on closed connections and potential application errors.
This is especially noticeable under heavy loads
URL to code causing the issue
No response
MCVE
# Your MCVE code here
Steps to reproduce
Screenshots
"![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"
Logs
No response
Litestar Version
latest
v2.12
Platform
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: