Skip to content
Permalink
Browse files

[IMP] core: avoid to process work when worker is 'killed' during sleep.

If a signal is received during the worker _runloop sleep,
the worker will be marked as alive=False but process_work
will still be called once.

This commit prevents that by checking the worker state before
calling process_work.

closes #31885

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
  • Loading branch information...
Xavier-Do committed Mar 15, 2019
1 parent 84df994 commit a4049296d9a343757c01fa3f3d32d70a0db77ab1
Showing with 2 additions and 0 deletions.
  1. +2 −0 odoo/service/server.py
@@ -763,6 +763,8 @@ def _runloop(self):
while self.alive:
self.multi.pipe_ping(self.watchdog_pipe)
self.sleep()
if not self.alive:
break
self.process_work()
self.check_limits()
except:

0 comments on commit a404929

Please sign in to comment.
You can’t perform that action at this time.