Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1292

ListCollectionNames does not appear to close the cursor it creates

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.2
    • Affects Version/s: 1.1.0
    • Component/s: CRUD
    • Labels:
      None
    • Fully Compatible

      I might be missing something but it seems that res.Close(context.Background()) should be called within ListCollectionNames.   The cursor is not returned to the caller in this case so I think it should be closed internally. 

      If this function does need a cursor Close() call then special attention would need to be made to ensure the cursor is closed if an error is encountered while iterating the results.  Currently, an error while iterating the results causes the function to immediately return the error.  

            Assignee:
            alice.thum@mongodb.com Alice Thum
            Reporter:
            ryan.m.wynn@gmail.com Ryan Wynn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: