diff --git a/cmd/yggdrasilctl/main.go b/cmd/yggdrasilctl/main.go index 788b4f19..180bea09 100644 --- a/cmd/yggdrasilctl/main.go +++ b/cmd/yggdrasilctl/main.go @@ -300,7 +300,7 @@ func handleGetSelf(res map[string]interface{}, verbose bool) { if boxSigKey, ok := v.(map[string]interface{})["key"].(string); ok { fmt.Println("Public key:", boxSigKey) } - if coords, ok := v.(map[string]interface{})["coords"].(string); ok { + if coords, ok := v.(map[string]interface{})["coords"].([]interface{}); ok { fmt.Println("Coords:", coords) } if verbose { diff --git a/src/core/proto.go b/src/core/proto.go index 5af59cc8..3c68c0e3 100644 --- a/src/core/proto.go +++ b/src/core/proto.go @@ -65,10 +65,16 @@ func (p *protoHandler) handleProto(from phony.Actor, key keyArray, bs []byte) { case typeProtoNodeInfoResponse: p.nodeinfo.handleRes(p, key, bs[1:]) case typeProtoDebug: - p._handleDebug(key, bs[1:]) + p.handleDebug(from, key, bs[1:]) } } +func (p *protoHandler) handleDebug(from phony.Actor, key keyArray, bs []byte) { + p.Act(from, func() { + p._handleDebug(key, bs) + }) +} + func (p *protoHandler) _handleDebug(key keyArray, bs []byte) { if len(bs) == 0 { return