summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/client/distlock.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/client/distlock.cpp b/src/mongo/client/distlock.cpp
index 3e091a55352..9a4d39f9770 100644
--- a/src/mongo/client/distlock.cpp
+++ b/src/mongo/client/distlock.cpp
@@ -301,6 +301,7 @@ namespace mongo {
}
bool shouldKill( const ConnectionString& conn, const string& processId ) {
+ scoped_lock lk( _mutex );
return _kill.count( pingThreadId( conn, processId ) ) > 0;
}
@@ -315,11 +316,11 @@ namespace mongo {
}
- static bool _pingerEnabled;
-
+ private:
+ // Protects all of the members below.
+ mongo::mutex _mutex;
set<string> _kill;
set<string> _seen;
- mongo::mutex _mutex;
list<OID> _oldLockOIDs;
} distLockPinger;