Browse code

fix unix socket

Signed-off-by: Victor Vieux <vieux@docker.com>

Victor Vieux authored on 2014/11/12 09:37:54
Showing 1 changed files
... ...
@@ -144,8 +144,8 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, key libtrust.PrivateKey,
144 144
 	if proto == "unix" {
145 145
 		// no need in compressing for local communications
146 146
 		tr.DisableCompression = true
147
-		tr.Dial = func(network, addr string) (net.Conn, error) {
148
-			return net.DialTimeout("unix", addr, 32*time.Second)
147
+		tr.Dial = func(dial_network, dial_addr string) (net.Conn, error) {
148
+			return net.DialTimeout(proto, addr, 32*time.Second)
149 149
 		}
150 150
 	} else {
151 151
 		tr.Dial = (&net.Dialer{Timeout: 32 * time.Second}).Dial