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

Self anchor in PooledLDAPConnection::setup's callback

    • Fully Compatible
    • ALL
    • v5.0, v4.4, v4.2, v4.0
    • Security 2021-05-17, Security 2021-05-31

      PooledLDAPConnection::setup spawns an asynchronous task which is responsible for establishing a connection to a remote LDAP server, and waiting for it to successfully respond to a command. This task does not anchor the PooledLDAPConnection, which is held by its per-host connection pool. If the owning connection pool times out and is reaped, the PooledLDAPConnection may be desconstructed while being used by the callback.

       

      The callback spawned by PooledLDAPConnection::setup should retain a std::shared_ptr to the PooledLDAPConnection which dispatched it.

            Assignee:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Reporter:
            spencer.jackson@mongodb.com Spencer Jackson
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: