Skip to content

Commit

Permalink
Only start health check for http connections (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
amalshaji authored Jan 15, 2025
1 parent 90772b8 commit c05d934
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tunnel/internal/client/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,10 @@ func (s *SshClient) Start(ctx context.Context) {
os.Exit(1)
case <-time.After(5 * time.Second):
// If no error after 2 seconds, assume connection is successful
// Start the health check routine
s.StartHealthCheck(ctx)
// Start the health check routine for http connections
if s.config.Tunnel.Type == constants.Http {
s.StartHealthCheck(ctx)
}
}
}

Expand Down

0 comments on commit c05d934

Please sign in to comment.