Conversation
WebSocketResponse.prepared not correctly reflect the WebSocket's prepared state
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10971 +/- ##
==========================================
+ Coverage 98.10% 98.77% +0.66%
==========================================
Files 129 129
Lines 39541 39620 +79
Branches 2185 2186 +1
==========================================
+ Hits 38792 39133 +341
+ Misses 591 339 -252
+ Partials 158 148 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #10971 will not alter performanceComparing Summary
|
Backport to 3.11: 💚 backport PR created✅ Backport PR branch: Backported as #10982 🤖 @patchback |
Backport to 3.12: 💚 backport PR created✅ Backport PR branch: Backported as #10983 🤖 @patchback |
…not correctly reflect the WebSocket's prepared state (#10982) Co-authored-by: J. Nick Koston <[email protected]> fixes #6009
…not correctly reflect the WebSocket's prepared state (#10983) Co-authored-by: J. Nick Koston <[email protected]> fixes #6009
This PR fixes an issue where the
WebSocketResponse.preparedproperty did not correctly reflect the WebSocket's prepared state, particularly during timeout scenarios.Previously, the
preparedproperty inherited fromStreamResponseonly checked for_payload_writer, but in WebSocket timeout scenarios, the_writercould be set while_payload_writerremainedNone, leading to incorrect state reporting.Changes
preparedproperty toWebSocketResponsethat checks for_writerinstead of relying on the parent class's_payload_writercheckprepare()method to prevent double preparation when_writeris already setfixes #6009