Skip to content

Commit

Permalink
path: stop watching path specs once we triggered the target unit
Browse files Browse the repository at this point in the history
We start watching them again once we get a notification that triggered
unit entered inactive or failed state.

Fixes: #10503
  • Loading branch information
msekletar authored and keszybz committed Sep 17, 2019
1 parent e8c36cc commit 8fca694
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8fca694

Please sign in to comment.