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: can wait up to 1s to shut down.

(only applies when the --dev=reload option is given)
  • Loading branch information...
Icallhimtest committed Mar 14, 2019
1 parent f7682f5 commit 18b464562e4ab49d3ad2ab18cd53acf605cfc8fc
Showing with 2 additions and 2 deletions.
  1. +2 −2 odoo/service/server.py
@@ -1018,10 +1018,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 18b4645

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.