Skip to content

Commit

Permalink
adder: make chan size a constant
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
  • Loading branch information
kevina committed Mar 8, 2017
1 parent 1816164 commit 921afcc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const (
cidVersionOptionName = "cid-version"
)

const adderOutChanSize = 8

var AddCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Add a file or directory to ipfs.",
Expand Down Expand Up @@ -210,7 +212,7 @@ You can now refer to the added file in a gateway, like so:
return
}

outChan := make(chan interface{}, 8)
outChan := make(chan interface{}, adderOutChanSize)
res.SetOutput((<-chan interface{})(outChan))

fileAdder.Out = outChan
Expand Down

0 comments on commit 921afcc

Please sign in to comment.