Skip to content

Commit

Permalink
Allow concurrent local connections
Browse files Browse the repository at this point in the history
  • Loading branch information
alebeck committed Oct 6, 2024
1 parent 74137b4 commit ddf3127
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/tunnel/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func (t *Tunnel) handleLocalConns() {
defer t.client.Close()

for {
// Only handle one connection at a time
local, err := t.listener.Accept()
if err != nil {
log.Errorf("could not accept: %v", err)
Expand All @@ -105,7 +104,7 @@ func (t *Tunnel) handleLocalConns() {
return
}

runTunnel(local, remote)
go runTunnel(local, remote)
}
}

Expand Down

0 comments on commit ddf3127

Please sign in to comment.