Skip to content

Commit

Permalink
agent: stop units in goroutine during init
Browse files Browse the repository at this point in the history
  • Loading branch information
bcwaldon committed Jul 8, 2014
1 parent 4109bff commit bb133e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ func (a *Agent) Initialize() {
for _, name := range units {
if _, ok := loaded[name]; !ok {
log.Infof("Unit(%s) should not be loaded here, unloading", name)
a.um.Stop(name)
a.um.Unload(name)
go func() {
a.um.Stop(name)
a.um.Unload(name)
}()
}
}

Expand Down

0 comments on commit bb133e1

Please sign in to comment.