heroku-python / flask-sockets

[DEPRECATED] Alternative: https://github.com/miguelgrinberg/flask-sock
MIT License
1.74k stars 167 forks source link

how to detect dead socket? #63

Closed yuyang0 closed 5 years ago

yuyang0 commented 6 years ago

Is there any way to detect if the client has closed the connection?

NoeelMoeskops commented 5 years ago

if ws.closed: should do the trick.