Merge branch 'master' into kill-rogue-processes
diff --git a/.travis.yml b/.travis.yml
index 3b26c7c..8ed1e44 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,8 @@
 language: go
 go:
   - 1.5
-  - tip
+  - 1.6.2
+  - stable
 
 install:
   - go get -v ./...
diff --git a/gexec/build.go b/gexec/build.go
index 25b7d51..220c8c4 100644
--- a/gexec/build.go
+++ b/gexec/build.go
@@ -9,9 +9,13 @@
 	"path"
 	"path/filepath"
 	"runtime"
+	"sync"
 )
 
-var tmpDir string
+var (
+	mu     sync.Mutex
+	tmpDir string
+)
 
 /*
 Build uses go build to compile the package at packagePath.  The resulting binary is saved off in a temporary directory.
@@ -60,6 +64,8 @@
 gexec. In Ginkgo this is typically done in an AfterSuite callback.
 */
 func CleanupBuildArtifacts() {
+	mu.Lock()
+	defer mu.Unlock()
 	if tmpDir != "" {
 		os.RemoveAll(tmpDir)
 		tmpDir = ""
@@ -68,6 +74,8 @@
 
 func temporaryDirectory() (string, error) {
 	var err error
+	mu.Lock()
+	defer mu.Unlock()
 	if tmpDir == "" {
 		tmpDir, err = ioutil.TempDir("", "gexec_artifacts")
 		if err != nil {
diff --git a/ghttp/test_server.go b/ghttp/test_server.go
index f5f537e..2f76bb2 100644
--- a/ghttp/test_server.go
+++ b/ghttp/test_server.go
@@ -223,7 +223,7 @@
 
 		//If the handler panics GHTTP will silently succeed.  This is bad™.
 		//To catch this case we need to fail the test if the handler has panicked.
-		//However, if the handler is panicking because Ginkgo's causing it to panic (i.e. an asswertion failed)
+		//However, if the handler is panicking because Ginkgo's causing it to panic (i.e. an assertion failed)
 		//then we shouldn't double-report the error as this will confuse people.
 
 		//So: step 1, if this is a Ginkgo panic - do nothing, Ginkgo's aware of the failure
diff --git a/ghttp/test_server_test.go b/ghttp/test_server_test.go
index 4f78fac..b8a9318 100644
--- a/ghttp/test_server_test.go
+++ b/ghttp/test_server_test.go
@@ -55,8 +55,8 @@
 					io.WriteString(w, req.RemoteAddr)
 				},
 			)
-
-			resp, err := http.Get(s.URL())
+			client := http.Client{Transport: &http.Transport{DisableKeepAlives: true}}
+			resp, err := client.Get(s.URL())
 			Ω(err).ShouldNot(HaveOccurred())
 			Ω(resp.StatusCode).Should(Equal(200))
 
@@ -66,7 +66,7 @@
 
 			s.CloseClientConnections()
 
-			resp, err = http.Get(s.URL())
+			resp, err = client.Get(s.URL())
 			Ω(err).ShouldNot(HaveOccurred())
 			Ω(resp.StatusCode).Should(Equal(200))