path: stop watching path specs once we triggered the target unit

We start watching them again once we get a notification that triggered
unit entered inactive or failed state.

Fixes: #10503
This commit is contained in:
Michal Sekletar 2019-09-09 14:38:35 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent e8c36cc596
commit 8fca6944c2

View file

@ -480,11 +480,9 @@ static void path_enter_running(Path *p) {
p->inotify_triggered = false;
r = path_watch(p);
if (r < 0)
goto fail;
path_set_state(p, PATH_RUNNING);
path_unwatch(p);
return;
fail: