prevent GreenletExit exception. But we still have a warning :

http://code.google.com/p/gevent/issues/detail?id=41
This commit is contained in:
benoitc 2010-09-01 09:46:01 +02:00
parent bbe7e46695
commit 5ff6cd173f

View File

@ -126,8 +126,14 @@ class GeventBaseWorker(Worker):
except KeyboardInterrupt: except KeyboardInterrupt:
pass pass
with gevent.Timeout(self.timeout, False): server.stop(timeout=self.timeout)
gevent.spawn(server.stop).join()
def handle_request(self, *args):
try:
super(GeventBaseWorker, self).handle_request(*args)
except gevent.GreenletExit:
pass
class WSGIHandler(wsgi.WSGIHandler): class WSGIHandler(wsgi.WSGIHandler):
def log_request(self, *args): def log_request(self, *args):