adder: make chan size a constant
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
Kevin Atkinson committed
Mar 5, 2017 at 22:58 UTC
cf562403d2fc0672f83bd47ed85dc41db2814b66
1 file changed
+3
-1
core/commands/add.go
+3
-1
@@ -40,6 +40,8 @@ const (
40
fstoreCacheOptionName = "fscache"
41
)
42
43
+const adderOutChanSize = 8
44
+
45
var AddCmd = &cmds.Command{
46
Helptext: cmds.HelpText{
47
Tagline: "Add a file or directory to ipfs.",
@@ -208,7 +210,7 @@ You can now refer to the added file in a gateway, like so:
210
return
211
}
212
211
- outChan := make(chan interface{}, 8)
213
+ outChan := make(chan interface{}, adderOutChanSize)
214
res.SetOutput((<-chan interface{})(outChan))
215
216
fileAdder.Out = outChan