Skip to content

Commit

Permalink
update listener type (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfullerton44 authored Oct 9, 2024
1 parent e5953a0 commit f46cdab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions go/tunnels/ssh/client_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ 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
}
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)
}
Expand Down
2 changes: 1 addition & 1 deletion go/tunnels/tunnels.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit f46cdab

Please sign in to comment.