提交 90943458 作者: Jeromy

make swarm connect return an error when it fails

License: MIT
Signed-off-by: 's avatarJeromy <jeromyj@gmail.com>
上级 795e2422
......@@ -237,10 +237,10 @@ ipfs swarm connect /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3
err := n.PeerHost.Connect(ctx, pi)
if err != nil {
output[i] += " failure: " + err.Error()
} else {
output[i] += " success"
res.SetError(fmt.Errorf("%s failure: %s", output[i], err), cmds.ErrNormal)
return
}
output[i] += " success"
}
res.SetOutput(&stringList{output})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论