Skip to content

Commit

Permalink
apply comments
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
  • Loading branch information
NikitaSkrynnik committed May 5, 2022
1 parent f9457e1 commit 7e1df44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/kernel/tools/heal/liveness_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ const (
// NewKernelLivenessCheck is an implementation of heal.LivenessCheck. It sends ICMP
// ping and checks reply. Returns false if didn't get reply.
func NewKernelLivenessCheck(deadlineCtx context.Context, conn *networkservice.Connection) bool {
if mechanism := kernel.ToMechanism(conn.GetMechanism()); mechanism == nil {
log.FromContext(deadlineCtx).Errorf("Ping failed: wrong mechanism type")
if mechanism := conn.GetMechanism().GetType(); mechanism != kernel.MECHANISM {
log.FromContext(deadlineCtx).Errorf("ping is not supported for mechanism %v", mechanism)
return true
}

p := fastping.NewPinger()
Expand Down

0 comments on commit 7e1df44

Please sign in to comment.