Skip to content

Commit 63b780e

Browse files
authored
CDRIVER-3685 address TSAN warning for mongoc_handshake_t::frozen (#1698)
1 parent 7b2ed29 commit 63b780e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.tsan-suppressions

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
race:mongoc_counter*
2-
race:_mongoc_handshake_freeze

src/libmongoc/src/mongoc/mongoc-handshake.c

+2
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,9 @@ _mongoc_handshake_build_doc_with_application (const char *appname)
726726
void
727727
_mongoc_handshake_freeze (void)
728728
{
729+
bson_mutex_lock (&gHandshakeLock);
729730
_mongoc_handshake_get ()->frozen = true;
731+
bson_mutex_unlock (&gHandshakeLock);
730732
}
731733

732734
/*

0 commit comments

Comments
 (0)