I have a client that makes a long standing http call, which can take a
while, using gevent like described here:
http://projects.unbit.it/uwsgi/wiki/Gevent

But during the request, I need a way to detect if the client has closed the
connection.

Since I´m using cherry for my dispatching, I want to be able to do
something like this: http://tools.cherrypy.org/wiki/IsClientConnected

If course when using uwsgi we don´t have the rfile.rfile._sock but I was
able to find the file descriptor for the uwsgi socket like this

fileDescriptor = int(cherrypy.request.wsgi_environ["wsgi.input"].fileno())
fileDescriptorState = fcntl.fcntl(fileDescriptor, fcntl.F_GETFD)

but it seems all connections come across the same socket, which I assume is
the connection from nginx to uwsgi.

Does the nginx uwsgi plugin notify the uwsgi process somehow if a client
closes the connection before uwsgi manages to finish the request ?

 - Oddur
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to