From 5559e49df3a5abe9fefbe9055be1dee1809ca0f9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 21 Aug 2013 11:00:07 -0700 Subject: [PATCH] packer/plugin: remove race in Exited() --- packer/plugin/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packer/plugin/client.go b/packer/plugin/client.go index 4b9f0bbf8..d3a302977 100644 --- a/packer/plugin/client.go +++ b/packer/plugin/client.go @@ -122,6 +122,8 @@ func NewClient(config *ClientConfig) (c *Client) { // Tells whether or not the underlying process has exited. func (c *Client) Exited() bool { + c.l.Lock() + defer c.l.Unlock() return c.exited }