From f46cdab0637f101acb6a008132936c3617a14b26 Mon Sep 17 00:00:00 2001 From: Jacob Fullerton Date: Wed, 9 Oct 2024 14:38:49 -0700 Subject: [PATCH] update listener type (#490) --- go/tunnels/ssh/client_session.go | 4 ++-- go/tunnels/tunnels.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go/tunnels/ssh/client_session.go b/go/tunnels/ssh/client_session.go index a17e861b..a3a0a67f 100644 --- a/go/tunnels/ssh/client_session.go +++ b/go/tunnels/ssh/client_session.go @@ -141,7 +141,7 @@ func (s *ClientSSHSession) forwardPort(ctx context.Context, port uint16) error { var i uint16 = 0 for i < 10 { portNum := port + i - innerListener, err := net.Listen("tcp", fmt.Sprintf(":%d", portNum)) + innerListener, err := net.Listen("tcp4", fmt.Sprintf(":%d", portNum)) if err == nil { listener = innerListener break @@ -149,7 +149,7 @@ func (s *ClientSSHSession) forwardPort(ctx context.Context, port uint16) error { i++ } if listener == nil { - innerListener, err := net.Listen("tcp", ":0") + innerListener, err := net.Listen("tcp4", ":0") if err != nil { return fmt.Errorf("error creating listener: %w", err) } diff --git a/go/tunnels/tunnels.go b/go/tunnels/tunnels.go index 5523b501..beaacd0c 100644 --- a/go/tunnels/tunnels.go +++ b/go/tunnels/tunnels.go @@ -10,7 +10,7 @@ import ( "github.com/rodaine/table" ) -const PackageVersion = "0.1.12" +const PackageVersion = "0.1.13" func (tunnel *Tunnel) requestObject() (*Tunnel, error) { convertedTunnel := &Tunnel{