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

Context pinned by connection.connect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.5
    • Component/s: None
    • Labels:
      None

      Description

      The connection.connect function wraps the supplied context using context.WithCancel and stores the returned cancellation function so we can abort connection establishment. We need to ensure we call that function in a defer after connect finishes and also set it to nil because the cancellation function holds a reference to the context, which pins all of the memory that the context has stored.

      This will require a mutex for syncrhonization because the cancellation function is accessed by both the connect and closeConnectContext functions.

        Attachments

          Activity

            People

            Assignee:
            kriti.ravindran Kriti Ravindran (Inactive)
            Reporter:
            divjot.arora Divjot Arora
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: