Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1129

Ensure there is no memory leak when a ReceiveMessageAsync task is cancelled

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0
    • Affects Version/s: None
    • Component/s: Connectivity
    • Labels:
      None

      If a ReceiveMessageAsync task is cancelled, the server is still going to eventually send the message, and as currently coded that message will be received and put in the AsyncDropbox.

      However, if the ReceiveMessageAsync task has been cancelled then we need to ensure that when the message finally arrives, which is no longer being waited on by anything, it does not get put in the dropbox and stay there forever resulting in a memory leak.

      There are multiple ways to resolve this. As long as the unwanted message gets properly disposed of, that's what matters most.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: