Merge pull request #28 from djs55/9pudc

9pudc: add `defer conn.Close()` for the connection to docker
This commit is contained in:
Dave Scott
2016-02-12 11:04:04 +00:00

View File

@@ -90,6 +90,8 @@ func handleOne(id int) {
} }
time.Sleep(50 * time.Millisecond) time.Sleep(50 * time.Millisecond)
} }
defer conn.Close()
if err != nil { if err != nil {
// If the forwarding program has broken then close and continue // If the forwarding program has broken then close and continue
log.Println("Failed to connect to Unix domain socket after 10s", sock, err) log.Println("Failed to connect to Unix domain socket after 10s", sock, err)