mirror of https://github.com/docker/compose.git
make metrics tests pass on windows
Signed-off-by: guillaume.tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
9ad06e55b5
commit
886363b44a
|
@ -20,6 +20,7 @@ package metrics
|
|||
|
||||
import (
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Microsoft/go-winio"
|
||||
|
@ -30,6 +31,9 @@ var (
|
|||
)
|
||||
|
||||
func conn() (net.Conn, error) {
|
||||
timeout := 200 * time.Millisecond
|
||||
return winio.DialPipe(socket, &timeout)
|
||||
if strings.HasPrefix(socket, `\\.\pipe\`) {
|
||||
timeout := 200 * time.Millisecond
|
||||
return winio.DialPipe(socket, &timeout)
|
||||
}
|
||||
return net.Dial("unix", socket)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue