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:
parent
bd2d706745
commit
af478e0e45
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user