Skip to content

Commit

Permalink
fix: panic on IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
sjlleo committed Jan 18, 2023
1 parent 09a5b42 commit 326034b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trace/icmp_ipv6.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ func (t *ICMPTracerv6) Execute() (*Result, error) {
Error: ErrHopLimitTimeout,
})
}
t.RealtimePrinter(&t.res, t.MaxHops-1)
if t.RealtimePrinter != nil {
t.RealtimePrinter(&t.res, t.MaxHops-1)
}
}

return &t.res, nil
Expand Down

0 comments on commit 326034b

Please sign in to comment.