Skip to content

Commit 8e850bc

Browse files
author
zounengren
committed
replace deprecated Dail with DailContext
Signed-off-by: Zou Nengren <[email protected]>
1 parent 61a46e9 commit 8e850bc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

runtime/v2/shim/util_unix.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ func SocketAddress(ctx context.Context, socketPath, id string) (string, error) {
7777

7878
// AnonDialer returns a dialer for a socket
7979
func AnonDialer(address string, timeout time.Duration) (net.Conn, error) {
80-
return dialer.Dialer(socket(address).path(), timeout)
80+
ctx, cancel := context.WithTimeout(context.Background(), timeout)
81+
defer cancel()
82+
return dialer.ContextDialer(ctx, socket(address).path())
8183
}
8284

8385
// AnonReconnectDialer returns a dialer for an existing socket on reconnection

0 commit comments

Comments
 (0)