File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -212,20 +212,15 @@ The JSON output contains type information.
212
212
}
213
213
214
214
func makeDagNodeLinkResults (req * cmds.Request , dagnode ipld.Node ) <- chan unixfs.LinkResult {
215
- linkResults := make (chan unixfs.LinkResult )
216
- go func () {
217
- defer close (linkResults )
218
- for _ , l := range dagnode .Links () {
219
- select {
220
- case linkResults <- unixfs.LinkResult {
221
- Link : l ,
222
- Err : nil ,
223
- }:
224
- case <- req .Context .Done ():
225
- return
226
- }
215
+ links := dagnode .Links ()
216
+ linkResults := make (chan unixfs.LinkResult , len (links ))
217
+ defer close (linkResults )
218
+ for _ , l := range links {
219
+ linkResults <- unixfs.LinkResult {
220
+ Link : l ,
221
+ Err : nil ,
227
222
}
228
- }()
223
+ }
229
224
return linkResults
230
225
}
231
226
You can’t perform that action at this time.
0 commit comments