heroku-python / flask-sockets

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

SocketMiddleware.__call__: avoid exception when 'wsgi.websocket' isn't i... #11

Closed offby1 closed 8 years ago

offby1 commented 10 years ago

...n the environment.

Such an exception is easy for a client to induce: they need merely point a web browser at the relevant endpoint. And the exception might take a long time to handle -- if we're running under gunicorn, it will restart the worker; that takes tens or hundreds of milliseconds. This way, the browser will probably get a 404, and the server process can quickly get back to work.

kennethreitz commented 8 years ago

Thanks, @offby1! This is now fully integrated (although the code is a bit different). Sorry for the delay!

:sparkles: :cake: :sparkles: