mirror of
https://github.com/docker/compose.git
synced 2026-09-01 07:11:06 +00:00
make metrics tests pass on windows
Signed-off-by: guillaume.tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
9ad06e55b5
commit
886363b44a
1 changed files with 6 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue