Skip to content

Commit 8c8c956

Browse files
committed
Deviations: fix reporting of existing intents
1 parent 79c9108 commit 8c8c956

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/datastore/transaction_rpc.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ func (d *Datastore) LoadAllButRunningIntents(ctx context.Context, root *tree.Roo
151151

152152
for {
153153
select {
154-
case err := <-ErrChan:
154+
case err, ok := <-ErrChan:
155+
if !ok {
156+
// ErrChan already closed which is fine, continue
157+
ErrChan = nil
158+
continue
159+
}
155160
return nil, err
156161
case <-ctx.Done():
157162
return nil, fmt.Errorf("context closed while retrieving all intents")

0 commit comments

Comments
 (0)