Skip to content

Commit

Permalink
Wrap backhaul connection in check if reuse sock is set (not in proxy …
Browse files Browse the repository at this point in the history
…mode)
  • Loading branch information
bkneis committed Jan 6, 2025
1 parent e5e30b6 commit fbff175
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -923,11 +923,14 @@ func startBrowserTunnel(
) error {
// Setup a backhaul SSH connection using the remote user so there is an AUTH SOCK to use
// With normal IDEs this would be the SSH connection made by the IDE
go func() {
if err := setupBackhaul(client, authSockID, logger); err != nil {
logger.Error("Failed to setup backhaul SSH connection: ", err)
}
}()
// authSockID is not set when in proxy mode since we cannot use the proxies ssh-agent
if authSockID != "" {
go func() {
if err := setupBackhaul(client, authSockID, logger); err != nil {
logger.Error("Failed to setup backhaul SSH connection: ", err)
}
}()
}
err := tunnel.NewTunnel(
ctx,
func(ctx context.Context, stdin io.Reader, stdout io.Writer) error {
Expand Down

0 comments on commit fbff175

Please sign in to comment.