We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bff3e6 commit 2c5bdc8Copy full SHA for 2c5bdc8
repository_pool.go
@@ -157,6 +157,8 @@ type RowRepoIter interface {
157
// RowRepoIter is used as the base to iterate over all the repositories
158
// in the pool
159
type rowRepoIter struct {
160
+ mu sync.Mutex
161
+
162
repositoryIter *RepositoryIter
163
iter RowRepoIter
164
session *Session
@@ -219,6 +221,9 @@ func NewRowRepoIter(
219
221
}
220
222
223
func (i *rowRepoIter) setError(err error) {
224
+ i.mu.Lock()
225
+ defer i.mu.Unlock()
226
227
i.err = err
228
229
@@ -312,6 +317,9 @@ func (i *rowRepoIter) rowReader(num int) {
312
317
func (i *rowRepoIter) Next() (sql.Row, error) {
313
318
row, ok := <-i.rows
314
319
if !ok {
320
321
322
315
323
return nil, i.err
316
324
325
0 commit comments