5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-22 17:35:39 +00:00

fix very special case bug when trying to dhtPing the root via the admin api

This commit is contained in:
Arceliar 2018-12-08 00:42:13 -06:00
parent bd2d706745
commit af478e0e45

View File

@ -739,6 +739,10 @@ func (a *admin) admin_dhtPing(keyString, coordString, targetString string) (dhtR
}
var coords []byte
for _, cstr := range strings.Split(strings.Trim(coordString, "[]"), " ") {
if cstr == "" {
// Special case, happens if trimmed is the empty string, e.g. this is the root
continue
}
if u64, err := strconv.ParseUint(cstr, 10, 8); err != nil {
return dhtRes{}, err
} else {