Merge pull request #2152 from hashicorp/b-fix-dev-shutdown-race
Fix race when shutting down in dev mode
This commit is contained in:
commit
86d5720e4c
|
@ -378,12 +378,10 @@ func (c *Client) Shutdown() error {
|
|||
|
||||
// Destroy all the running allocations.
|
||||
if c.config.DevMode {
|
||||
c.allocLock.Lock()
|
||||
for _, ar := range c.allocs {
|
||||
for _, ar := range c.getAllocRunners() {
|
||||
ar.Destroy()
|
||||
<-ar.WaitCh()
|
||||
}
|
||||
c.allocLock.Unlock()
|
||||
}
|
||||
|
||||
c.shutdown = true
|
||||
|
|
Loading…
Reference in a new issue