Commit 9c83bd09 authored by Jeromy's avatar Jeromy
Browse files

fix for #757

parent d2544da5
...@@ -154,9 +154,11 @@ func (pi *PeerInfo) UnmarshalJSON(b []byte) error { ...@@ -154,9 +154,11 @@ func (pi *PeerInfo) UnmarshalJSON(b []byte) error {
return err return err
} }
pi.ID = pid pi.ID = pid
addrs := data["Addrs"].([]interface{}) addrs, ok := data["Addrs"].([]interface{})
for _, a := range addrs { if ok {
pi.Addrs = append(pi.Addrs, ma.StringCast(a.(string))) for _, a := range addrs {
pi.Addrs = append(pi.Addrs, ma.StringCast(a.(string)))
}
} }
return nil return nil
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment