Skip to content
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

Catch the WebSocketError when closing the connection by the client #255

Open
Airboy opened this issue Mar 2, 2018 · 1 comment
Open

Comments

@Airboy
Copy link

Airboy commented Mar 2, 2018

Is there a way to catch the WebSocketError when the client (frontend) explicitly closes the connection?
Currently, I have the following errors in my logs:

[uwsgi] WebSocketError: unable to receive websocket message
| Traceback (most recent call last):
|   File "/var/www/lib/python3.5/site-packages/ws4redis/uwsgi_runserver.py", line 28, in receive
|     return uwsgi.websocket_recv_nb()
| OSError: unable to receive websocket message
|
| During handling of the above exception, another exception occurred:
|
| Traceback (most recent call last):
|   File "/var/www/lib/python3.5/site-packages/ws4redis/wsgi_server.py", line 123, in __call__
|     recvmsg = RedisMessage(websocket.receive())
|   File "/var/www/lib/python3.5/site-packages/ws4redis/uwsgi_runserver.py", line 31, in receive
|     raise WebSocketError(e)
| ws4redis.exceptions.WebSocketError: unable to receive websocket message
| [uwsgi] WebSocketError: unable to receive websocket message
| Traceback (most recent call last):
|   File "/var/www/lib/python3.5/site-packages/ws4redis/uwsgi_runserver.py", line 28, in receive
|     return uwsgi.websocket_recv_nb()
| OSError: unable to receive websocket message

It's not critical but it should be better to catch this specific error.

@ghost
Copy link

ghost commented Aug 2, 2018

have you solved this problem???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant