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

ListCollectionNames does not appear to close the cursor it creates

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 1.1.2
    • 1.1.0
    • CRUD
    • None
    • Fully Compatible

    Description

      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.  

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: