Skip to content

Commit dab62e5

Browse files
committed
portfwd: do not use listenConfig param on Unix domain sockets
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
1 parent f30d5da commit dab62e5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pkg/portfwd/listener_darwin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ func Listen(ctx context.Context, listenConfig net.ListenConfig, hostAddress stri
1919
if err := prepareUnixSocket(hostAddress); err != nil {
2020
return nil, err
2121
}
22-
unixLis, err := listenConfig.Listen(ctx, "unix", hostAddress)
22+
var lc net.ListenConfig
23+
unixLis, err := lc.Listen(ctx, "unix", hostAddress)
2324
if err != nil {
2425
logrus.WithError(err).Errorf("failed to listen unix: %v", hostAddress)
2526
return nil, err

pkg/portfwd/listener_others.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ func Listen(ctx context.Context, listenConfig net.ListenConfig, hostAddress stri
1919
if err := prepareUnixSocket(hostAddress); err != nil {
2020
return nil, err
2121
}
22-
unixLis, err := listenConfig.Listen(ctx, "unix", hostAddress)
22+
var lc net.ListenConfig
23+
unixLis, err := lc.Listen(ctx, "unix", hostAddress)
2324
if err != nil {
2425
logrus.WithError(err).Errorf("failed to listen unix: %v", hostAddress)
2526
return nil, err

0 commit comments

Comments
 (0)