Skip to content

Conversation

ssimeonov
Copy link
Contributor

The current implementation of Mongo::Collection#find will fail to close a cursor in the cases of an exception. This pull request fixes the problem by wrapping the yield statement in a begin-ensure-end block.

brndnblck pushed a commit that referenced this pull request Oct 3, 2012
Eliminates cursor leak in database
@brndnblck brndnblck merged commit 21c9d1a into mongodb:master Oct 3, 2012
@TylerBrock
Copy link
Contributor

Thanks @ssimeonov and @brandonblack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants