Skip to content

Commit a4b6954

Browse files
committed
PHP-1337: Implement killing a MongoDB Cursor
1 parent 659e9f9 commit a4b6954

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MongoDB/Cursor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
/* External libs */
2828
#include <bson.h>
2929
#include <mongoc.h>
30+
#include <mongoc-cursor-private.h>
3031

3132
/* PHP Core stuff */
3233
#include <php.h>
@@ -144,8 +145,7 @@ PHP_METHOD(Cursor, kill)
144145
zend_restore_error_handling(&error_handling TSRMLS_CC);
145146

146147
hint = mongoc_cursor_get_hint(intern->cursor);
147-
/* FIXME: Resolve a hint to a client */
148-
//mongoc_client_kill_cursor(php_phongo_client_from_hint(hint), mongoc_cursor_get_id(intern->cursor));
148+
mongoc_client_kill_cursor(intern->cursor->client, mongoc_cursor_get_id(intern->cursor));
149149
}
150150
/* }}} */
151151
/* {{{ proto boolean Cursor::setBatchSize(integer $batchSize)

0 commit comments

Comments
 (0)