We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I suppose support for the ConnectionClosed exception needs to be implemented in WebsocketConnectionView. See websockets changelog: https://websockets.readthedocs.org/en/stable/changelog.html
I updated the code as followed:
from websockets.exceptions import ConnectionClosed @asyncio.coroutine def __call__(self, ws): self.ws = ws yield from self.on_open() while True: try: message = yield from self.ws.recv() if message is None: yield from self.on_close() break yield from self.on_message(message) except ConnectionClosed: yield from self.on_close() break
Would this be a suitable solution?
The text was updated successfully, but these errors were encountered:
That works for the class-based websocket, but it doesn't protect code that uses the function approach. I should have a fix for this out later today.
Sorry, something went wrong.
239a191
Thank you very much for your quick response. I will try your new version later today.
housleyjk
No branches or pull requests
I suppose support for the ConnectionClosed exception needs to be implemented in WebsocketConnectionView. See websockets changelog: https://websockets.readthedocs.org/en/stable/changelog.html
I updated the code as followed:
Would this be a suitable solution?
The text was updated successfully, but these errors were encountered: