Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1895

Clean up _mongoc_topology_scanner_cb's mutex logic

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.5.0
    • Affects Version/s: 1.2.0
    • Component/s: libmongoc
    • None

      There's a very hacky bit, let's fix it:

         if (rtt_msec >= 0) {
            /* If the scanner failed to create a socket for this server, that means
             * we're in scanner_start, which means we're under the mutex.  So don't
             * take the mutex for rtt < 0 */
      
            mongoc_mutex_lock (&topology->mutex);
         }
      

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: