Skip to content

Commit

Permalink
sup: immediately set initialization_state if no init hook exists
Browse files Browse the repository at this point in the history
I believe this broke in habitat-sh#7111. For services with no run hook, hab-sup
would wait forever for the service to enter the InitializerFinished
state.

Signed-off-by: Steven Danna <steve@chef.io>
  • Loading branch information
stevendanna committed Oct 28, 2019
1 parent 66c05d5 commit 593037e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/sup/src/manager/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,8 @@ impl Service {
self.initialize_handle = Some(handle);
let f = f.map_err(|_| ());
executor.spawn(f);
} else {
*self.initialization_state.write() = InitializationState::InitializerFinished;
}
}

Expand Down

0 comments on commit 593037e

Please sign in to comment.