1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-10-14 10:15:48 +08:00

fix: use EmitOnce where only single response is to be sent

Part of #4818

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera
2018-03-16 10:17:34 +01:00
parent 682b263f3a
commit 59178057a2
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ func CommandsCmd(root *cmds.Command) *cmds.Command {
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) {
rootCmd := cmd2outputCmd("ipfs", root)
rootCmd.showOpts, _ = req.Options[flagsOptionName].(bool)
err := res.Emit(&rootCmd)
err := cmds.EmitOnce(res, &rootCmd)
if err != nil {
log.Error(err)
}