packer/plugin: remove race in Exited()
This commit is contained in:
parent
c05b6d628b
commit
5559e49df3
|
@ -122,6 +122,8 @@ func NewClient(config *ClientConfig) (c *Client) {
|
||||||
|
|
||||||
// Tells whether or not the underlying process has exited.
|
// Tells whether or not the underlying process has exited.
|
||||||
func (c *Client) Exited() bool {
|
func (c *Client) Exited() bool {
|
||||||
|
c.l.Lock()
|
||||||
|
defer c.l.Unlock()
|
||||||
return c.exited
|
return c.exited
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue