Skip to content
Permalink
Browse files

[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 #31855

Signed-off-by: Christophe Simonis <chs@odoo.com>
  • Loading branch information...
Icallhimtest committed Mar 14, 2019
1 parent 7b6cfc4 commit 744bdd275eff08fe7593dd8ca7aa9162b54ab275
Showing with 2 additions and 2 deletions.
  1. +2 −2 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

0 comments on commit 744bdd2

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