[CDRIVER-1895] Clean up _mongoc_topology_scanner_cb's mutex logic Created: 02/Nov/16  Updated: 11/Nov/16  Resolved: 11/Nov/16

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.2.0
Fix Version/s: 1.5.0

Type: Improvement Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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);
   }



 Comments   
Comment by Githook User [ 11/Nov/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1895 clean up topology locking in callback
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/fbe7dca4173ec4ce7c4f201884b0f154857efb92

Generated at Wed Feb 07 21:13:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.