summaryrefslogtreecommitdiff
path: root/src/mongo/shell/query.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/query.js')
-rw-r--r--src/mongo/shell/query.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mongo/shell/query.js b/src/mongo/shell/query.js
index b43e13c23e8..a5d920cb109 100644
--- a/src/mongo/shell/query.js
+++ b/src/mongo/shell/query.js
@@ -98,10 +98,6 @@ DBQuery.prototype._canUseCommandCursor = function() {
(this._options & DBQuery.Option.exhaust) === 0;
};
-DBQuery.prototype._isTailableCursor = function() {
- return (this._options & DBQuery.Option.tailable) !== 0;
-};
-
/**
* This method is exposed only for the purpose of testing and should not be used in most contexts.
*
@@ -305,9 +301,7 @@ DBQuery.prototype.skip = function(skip) {
DBQuery.prototype.hasNext = function() {
this._exec();
- // Return when limit is reached for tailable cursors. For other cursor options, like an exhaust
- // cursor, the server manages closing.
- if (this._isTailableCursor() && this._limit > 0 && this._cursorSeen >= this._limit) {
+ if (this._limit > 0 && this._cursorSeen >= this._limit) {
this._cursor.close();
return false;
}