mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-12-22 16:07:31 +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
|
var coords []byte
|
||||||
for _, cstr := range strings.Split(strings.Trim(coordString, "[]"), " ") {
|
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 {
|
if u64, err := strconv.ParseUint(cstr, 10, 8); err != nil {
|
||||||
return dhtRes{}, err
|
return dhtRes{}, err
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user