Skip to content

Commit

Permalink
CDRIVER-3685 address TSAN warning for mongoc_handshake_t::frozen (#1698)
Browse files Browse the repository at this point in the history
  • Loading branch information
eramongodb authored Aug 12, 2024
1 parent 7b2ed29 commit 63b780e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion .tsan-suppressions
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
race:mongoc_counter*
race:_mongoc_handshake_freeze
2 changes: 2 additions & 0 deletions src/libmongoc/src/mongoc/mongoc-handshake.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,9 @@ _mongoc_handshake_build_doc_with_application (const char *appname)
void
_mongoc_handshake_freeze (void)
{
bson_mutex_lock (&gHandshakeLock);
_mongoc_handshake_get ()->frozen = true;
bson_mutex_unlock (&gHandshakeLock);
}

/*
Expand Down

0 comments on commit 63b780e

Please sign in to comment.