-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make WebsocketImplProtocol async iterable #2490
Conversation
Codecov ReportBase: 87.844% // Head: 88.425% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2490 +/- ##
=============================================
+ Coverage 87.844% 88.425% +0.581%
=============================================
Files 78 78
Lines 6466 6471 +5
Branches 1247 1247
=============================================
+ Hits 5680 5722 +42
+ Misses 560 517 -43
- Partials 226 232 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Just removed |
Thanks for the PR. This is a very useful feature and it helps to have parity with the websockets module. Receive on a closed socket should probably follow that as well, and no-error on clean close seems like the right thing to do anyway. Will approve as is if no-one else comments on that, with the code changes suggested. |
Can you add a test? |
Our test client with WebSocket mimic client support was not released so the CI would fail in this PR. Can we do a release or point the version of sanic-testing to the repo? |
Ooo nice! Yeah, I'll do that. |
Make websocket object iterable. Will add tests later when the code has been finalized.
Update:
Manual test was okay. Currently we don't have a test client in Sanic that can send and receive WebSocket messages, so it seems impossible to have a test case for this feature at this time.