[FIX] longpolling/gevent: automatically restart worker when killed

Whenever the longpolling/gevent worker dies, it
should be automatically restarted by the prefork
server, just like it happens for HTTP workers.
This commit is contained in:
Olivier Dony 2014-11-05 14:28:59 +01:00
parent 1719e6b922
commit 71247cebb6
1 changed files with 2 additions and 0 deletions

View File

@ -478,6 +478,8 @@ class PreforkServer(CommonServer):
self.long_polling_pid = popen.pid
def worker_pop(self, pid):
if pid == self.long_polling_pid:
self.long_polling_pid = None
if pid in self.workers:
_logger.debug("Worker (%s) unregistered", pid)
try: