MongoCursor implementations should throw if iterated after close

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Query Operations
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, MongoCursor implementations may return results even after they have been closed, because they are relying on the underlying BatchCursor to throw an exception, even though it's still possible to return results from the current batch, e.g.

      var cursor = collection.find().cursor();
      cursor.next();
      cursor.close();
      cursor.next();   // should throw, but does not if the first batch has > 1 results
      

              Assignee:
              Jeffrey Yemin
              Reporter:
              Jeffrey Yemin
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: