diff --git a/lib/db/level.js b/lib/db/level.js index 3a93b6c2..d4cb8008 100644 --- a/lib/db/level.js +++ b/lib/db/level.js @@ -144,6 +144,8 @@ Iterator.prototype.seek = function seek(key) { }; Iterator.prototype.end = function end(callback) { + if (this._end) + return callback(new Error('end() already called on iterator.')); this._end = true; this.iter.end(callback); };