Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19380

asio::ip::tcp::resolver::iterator instances should be passed by value

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.7
    • Affects Version/s: None
    • Component/s: Internal Code, Networking
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Platform 8 08/28/15, Platform 7 08/10/15

      Currently we capture resolver iterators by reference then pass them to callbacks - potentially leading to dangling references.

      Internally, the iterator maintains a shared_ptr to the vector of basic_resolver_entry objects. We should pass the iterator by value to make sure the basic_resolver_entry vector stays alive.

            Assignee:
            adam.midvidy Adam Midvidy
            Reporter:
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: