From 744bdd275eff08fe7593dd8ca7aa9162b54ab275 Mon Sep 17 00:00:00 2001 From: Denis Vermylen Date: Thu, 14 Mar 2019 15:08:52 +0000 Subject: [PATCH] [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 --- odoo/service/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo/service/server.py b/odoo/service/server.py index fd1566c4431..240d816ebd3 100644 --- a/odoo/service/server.py +++ b/odoo/service/server.py @@ -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