jrief / django-websocket-redis

Websockets for Django applications using Redis as message queue
http://django-websocket-redis.awesto.com/
MIT License
895 stars 222 forks source link

Fix deadlock condition for subscriber-only client #172

Closed gonzoua closed 1 year ago

gonzoua commented 8 years ago

WebsocketWSGIServer.call may block indefinitely if client sends PING opcode but nothing after it. PING opcode causes select to siganl activity on websocket_fd, subsequent call to Websocket.receive reads PING frame and continues to wait for actual data frame. If client is subscriber-only and sends only PINGs, this data never comes and Websocket.receiver does not return until client closes its end.

jrief commented 7 years ago

I would have to test this in my dev environment. Currently I feel unsure to merge this. I leave it open for now.