Pylons / waitress

Waitress - A WSGI server for Python 3
https://docs.pylonsproject.org/projects/waitress/en/latest/
Other
1.44k stars 164 forks source link

clarity on client_disconnected usage #415

Closed rishabh-vij closed 1 year ago

rishabh-vij commented 1 year ago

I was trying to implement the Allow tasks to notice if the client disconnected. feature mentioned in the changelog of version 2.0.0 but I'm unable to do so. There is a lack of clarity on the feature in the documentation. As stated in the changelog, I tried setting channel_request_lookahead to 1 as an environment variable (since there's no such argument in the serve function). After setting that I tried to access the waitress.client_disconnected callable - if waitress.client_disconnected() but I get an error module 'waitress' has no attribute 'client_disconnected'. I tried this on waitress version 2.1.2

mmerickel commented 1 year ago

it's a key in the wsgi environ