Commit f10c8282 authored by Jeromy's avatar Jeromy

handle error from GetClosestPeers

parent d5c6b1af
......@@ -60,6 +60,10 @@ var queryDhtCmd = &cmds.Command{
ctx := notif.RegisterForQueryEvents(req.Context().Context, events)
closestPeers, err := dht.GetClosestPeers(ctx, u.Key(req.Arguments()[0]))
if err != nil {
res.SetError(err, cmds.ErrNormal)
return
}
go func() {
defer close(events)
......
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