Skip to content

Commit

Permalink
Call Close to handle locking from makeReady
Browse files Browse the repository at this point in the history
  • Loading branch information
flimzy committed Oct 10, 2023
1 parent c02ddec commit 6fa7656
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions resultset.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,9 @@ func (r *ResultSet) makeReady(e *error) (unlock func(), err error) {
return nil, &internal.Error{Status: http.StatusNotFound, Message: "no results"}
}
return func() {
r.mu.Lock()
if err := r.close(nil); err != nil && e != nil {
if err := r.Close(); err != nil && e != nil {
*e = err
}
r.mu.Unlock()
}, nil
}
return r.mu.Unlock, nil
Expand Down

0 comments on commit 6fa7656

Please sign in to comment.