提交 aeebe48c 作者: Jeromy

send discovery off into its own goroutine

License: MIT
Signed-off-by: 's avatarJeromy <why@ipfs.io>
上级 5a920361
......@@ -105,6 +105,7 @@ To use, the daemon must be run with '--enable-pubsub-experiment'.
discover, _, _ := req.Option("discover").Bool()
if discover {
go func() {
blk := blocks.NewBlock([]byte("floodsub:" + topic))
cid, err := n.Blocks.AddObject(blk)
if err != nil {
......@@ -113,6 +114,7 @@ To use, the daemon must be run with '--enable-pubsub-experiment'.
}
connectToPubSubPeers(req.Context(), n, cid)
}()
}
},
Marshalers: cmds.MarshalerMap{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论