Skip to content

Commit ae8edde

Browse files
author
kuba--
committed
Do not close done channel in Close.
Signed-off-by: kuba-- <[email protected]>
1 parent 269410d commit ae8edde

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

repository_pool.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ type rowRepoIter struct {
272272
iter RowRepoIter
273273
session *Session
274274
ctx *sql.Context
275-
done chan bool
275+
done chan struct{}
276276
}
277277

278278
// NewRowRepoIter initializes a new repository iterator.
@@ -303,7 +303,7 @@ func NewRowRepoIter(
303303
iter: iter,
304304
session: s,
305305
ctx: ctx,
306-
done: make(chan bool),
306+
done: make(chan struct{}),
307307
}
308308

309309
return &repoIter, nil
@@ -366,8 +366,6 @@ func (i *rowRepoIter) Next() (sql.Row, error) {
366366

367367
// Close called to close the iterator
368368
func (i *rowRepoIter) Close() error {
369-
close(i.done)
370-
371369
if i.currRepoIter != nil {
372370
i.currRepoIter.Close()
373371
}

0 commit comments

Comments
 (0)