Skip to content

Commit

Permalink
Merge pull request #2860 from jandubois/tunnel-error
Browse files Browse the repository at this point in the history
Avoid crash when tunnel cannot be opened
  • Loading branch information
AkihiroSuda authored Nov 7, 2024
2 parents 6cd896f + 897410b commit 4d56dab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/portfwd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func HandleTCPConnection(ctx context.Context, client *guestagentclient.GuestAgen
stream, err := client.Tunnel(ctx)
if err != nil {
logrus.Errorf("could not open tcp tunnel for id: %s error:%v", id, err)
return
}

g, _ := errgroup.WithContext(ctx)
Expand Down Expand Up @@ -54,6 +55,7 @@ func HandleUDPConnection(ctx context.Context, client *guestagentclient.GuestAgen
stream, err := client.Tunnel(ctx)
if err != nil {
logrus.Errorf("could not open udp tunnel for id: %s error:%v", id, err)
return
}

g, _ := errgroup.WithContext(ctx)
Expand Down

0 comments on commit 4d56dab

Please sign in to comment.