Browse code

update timeout

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

Victor Vieux authored on 2014/11/13 12:21:18
Showing 1 changed files
... ...
@@ -141,14 +141,15 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, key libtrust.PrivateKey,
141 141
 	}
142 142
 
143 143
 	// Why 32? See issue 8035
144
+	timeout := 32 * time.Second
144 145
 	if proto == "unix" {
145 146
 		// no need in compressing for local communications
146 147
 		tr.DisableCompression = true
147 148
 		tr.Dial = func(dial_network, dial_addr string) (net.Conn, error) {
148
-			return net.DialTimeout(proto, addr, 32*time.Second)
149
+			return net.DialTimeout(proto, addr, timeout)
149 150
 		}
150 151
 	} else {
151
-		tr.Dial = (&net.Dialer{Timeout: 32 * time.Second}).Dial
152
+		tr.Dial = (&net.Dialer{Timeout: timeout}).Dial
152 153
 	}
153 154
 
154 155
 	return &DockerCli{