Skip to content

Commit 8367daf

Browse files
authored
Merge pull request #72 from Akvicor/master
fix ipv6 panic
2 parents 403bddb + 23af69f commit 8367daf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/mtr/mtr.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ func Mtr(addr string, srcAddr string, maxHops int, count int, timeout time.Durat
2323

2424
if err == nil {
2525
if len(out.Hops) == 0 {
26-
return nil, fmt.Errorf("MTR Expected at least one hop")
26+
return &out, fmt.Errorf("MTR Expected at least one hop")
2727
}
2828
} else {
29-
return nil, fmt.Errorf("MTR Failed due to an error: %v", err)
29+
return &out, fmt.Errorf("MTR Failed due to an error: %v", err)
3030
}
3131

3232
return &out, nil

0 commit comments

Comments
 (0)