From 6ca144ef3d62e358327249546bf83ce1e347be5c Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Wed, 12 Nov 2014 00:37:54 +0000 Subject: [PATCH] fix unix socket Signed-off-by: Victor Vieux --- api/client/cli.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/client/cli.go b/api/client/cli.go index 424ccf2fa2..7a806d64bb 100644 --- a/api/client/cli.go +++ b/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