From 27604ac5deae5ee2a49ff0e83d0225b404312585 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 1 Jul 2022 12:54:40 -0500 Subject: [PATCH] Proper pid parsing --- cli/net.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cli/net.go b/cli/net.go index 7167394f9..aeea4b131 100644 --- a/cli/net.go +++ b/cli/net.go @@ -276,9 +276,13 @@ var NetDisconnect = &cli.Command{ ids := cctx.Args().Slice() for _, id := range ids { - pid := peer.ID(id) + pid, err := peer.IDFromString(id) + if err != nil { + fmt.Printf("failure") + return err + } fmt.Printf("disconnect %s: ", pid.Pretty()) - err := api.NetDisconnect(ctx, pid) + err = api.NetDisconnect(ctx, pid) if err != nil { fmt.Println("failure") return err