mongodb/mongo-php-driver — pull request #203 by bjori (2012-10-16 21:59:16+00:00)
Title: Fixed PHP-515 (Re-implement ->close()) & PHP-533 (Callback map for destr...

...oying cursors)

When the cursor gets assigned an connection we add the cursor itself to
a callback map on the connection so when the connection for whatever
reason is destroyed (failover or explicitly) we can tell the cursor
about it and mark it as dead and unassign the connection.
Once the cursor gets out of scope/destroyed/finished it will be
unregistered from the connection callback.