浏览代码

fix unix socket

Signed-off-by: Victor Vieux <vieux@docker.com>
Victor Vieux 10 年之前
父节点
当前提交
6ca144ef3d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      api/client/cli.go

+ 2 - 2
api/client/cli.go

@@ -144,8 +144,8 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, key libtrust.PrivateKey,
 	if proto == "unix" {
 		// no need in compressing for local communications
 		tr.DisableCompression = true
-		tr.Dial = func(network, addr string) (net.Conn, error) {
-			return net.DialTimeout("unix", addr, 32*time.Second)
+		tr.Dial = func(dial_network, dial_addr string) (net.Conn, error) {
+			return net.DialTimeout(proto, addr, 32*time.Second)
 		}
 	} else {
 		tr.Dial = (&net.Dialer{Timeout: 32 * time.Second}).Dial