[FIX] server.py: stop the FSWatcher when stopping the server
Avoid potential tracebacks from the FSWatcher's thread being killed. Drawback: Server shut down can have an extra small delay (only applies when the --dev=reload option is given) closes odoo/odoo#31855 Signed-off-by: Christophe Simonis <chs@odoo.com>
This commit is contained in:
@@ -1019,10 +1019,10 @@ def start(preload=None, stop=False):
|
||||
|
||||
rc = server.run(preload, stop)
|
||||
|
||||
if watcher:
|
||||
watcher.stop()
|
||||
# like the legend of the phoenix, all ends with beginnings
|
||||
if getattr(odoo, 'phoenix', False):
|
||||
if watcher:
|
||||
watcher.stop()
|
||||
_reexec()
|
||||
|
||||
return rc if rc else 0
|
||||
|
||||
Reference in New Issue
Block a user