Skip to content

Commit

Permalink
[FIX] server.py: stop the FSWatcher when stopping the server
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Icallhimtest committed Mar 15, 2019
1 parent 33797a4 commit 0085192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions odoo/service/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0085192

Please sign in to comment.