mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-08 16:19:46 +00:00
Fix windows socket prefix
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f5b0d7884f)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
d13c793f0b
commit
650e431b1c
@@ -2,6 +2,7 @@ package cri
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
@@ -14,7 +15,11 @@ const maxMsgSize = 1024 * 1024 * 16
|
||||
|
||||
// Connection connects to a CRI socket at the given path.
|
||||
func Connection(ctx context.Context, address string) (*grpc.ClientConn, error) {
|
||||
addr, dialer, err := k8sutil.GetAddressAndDialer(socketPrefix + address)
|
||||
if !strings.HasPrefix(address, socketPrefix) {
|
||||
address = socketPrefix + address
|
||||
}
|
||||
|
||||
addr, dialer, err := k8sutil.GetAddressAndDialer(address)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user