Skip to content

Commit 2baa45c

Browse files
authored
Fix Windows shared mutex unlocking (#1445)
Unlike a POSIX read/write lock, in which both a read lock and a write lock are unlocked by the same function, Windows requires that a read lock is unlocked by a different function than a write lock. Related: CDRIVER-3514
1 parent 6fee88b commit 2baa45c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libmongoc/src/mongoc/mongoc-scram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ _mongoc_scram_cache_has_presecrets (mongoc_scram_cache_entry_t *cache /* out */,
201201
}
202202

203203
done:
204-
bson_shared_mutex_unlock (&g_scram_cache_rwlock);
204+
bson_shared_mutex_unlock_shared (&g_scram_cache_rwlock);
205205
return cache_hit;
206206
}
207207

0 commit comments

Comments
 (0)