Browse Source

Implement cursor destroy/close

saintedlama/travis-non-legacy
saintedlama 9 years ago
parent
commit
d95e6a6335
  1. 4
      lib/cursor.js

4
lib/cursor.js

@ -144,7 +144,9 @@ Cursor.prototype.destroy = function () {
var self = this
this._get(function (err, cursor) {
if (err) return self.emit('error', err)
if (cursor.kill) cursor.kill()
if (cursor.close) cursor.close(function(err) {
if (err) { self.emit('error', err) }
})
})
}

Loading…
Cancel
Save