Move unix specific tidbits into dialer_unix.go
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -2,7 +2,6 @@ package containerd
|
||||
|
||||
import (
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
@@ -18,7 +17,6 @@ func Dialer(address string, timeout time.Duration) (net.Conn, error) {
|
||||
stopC = make(chan struct{})
|
||||
synC = make(chan *dialResult)
|
||||
)
|
||||
address = strings.TrimPrefix(address, "unix://")
|
||||
go func() {
|
||||
defer close(synC)
|
||||
for {
|
||||
@@ -47,6 +45,6 @@ func Dialer(address string, timeout time.Duration) (net.Conn, error) {
|
||||
dr.c.Close()
|
||||
}
|
||||
}()
|
||||
return nil, errors.Errorf("dial %s: no such file or directory", address)
|
||||
return nil, errors.Errorf("dial %s: timeout", address)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user