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

Replace production context.TODO() with context.Background()

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Trivial - P5 Trivial - P5
    • 2.0.0
    • None
    • None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

    Description

      We occasionally use context.TODO() in non-example code. context.TODO() is functionally identical to context.Background() but semantically implies that we do not know what the context should be (as is the case with example code). This is not the case in production code, so we should replace usages of context.TODO() with context.Background() or a more appropriate context.

      In single_result.go.

      In topology.go.

      Attachments

        Activity

          People

            Unassigned Unassigned
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: