Skip to content

Commit 84df451

Browse files
committed
Adds a test to make sure channels are properly closed
1 parent 65e3e56 commit 84df451

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

sdk

Submodule sdk updated 1 file

src/apps/chifra/pkg/output/stream.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ type fetchDataFunc func(modelChan chan types.Modeler, errorChan chan error)
108108
func StreamMany(rCtx *RenderCtx, fetchData fetchDataFunc, options OutputOptions) error {
109109
if rCtx.ModelChan != nil {
110110
fetchData(rCtx.ModelChan, rCtx.ErrorChan)
111+
close(rCtx.ModelChan)
112+
close(rCtx.ErrorChan)
111113
return nil
112114
}
113115

0 commit comments

Comments
 (0)