summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorGreg Studer <greg@10gen.com>2011-06-01 13:27:47 -0700
committerGreg Studer <greg@10gen.com>2011-06-01 13:27:47 -0700
commitc954585085760b9b3113a323d0b19c6f32d4a203 (patch)
treec92be640fae60ec4f3bd12063ddc754c5f9b8675 /client
parent7db56fc74c2a774e58f72bd5ea79d078f2ed8a59 (diff)
downloadmongo-c954585085760b9b3113a323d0b19c6f32d4a203.tar.gz
don't force dist lock if ts changed but pings stopped - sync6
Minor safety increase, but probably helpful
Diffstat (limited to 'client')
-rw-r--r--client/distlock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/distlock.cpp b/client/distlock.cpp
index 8692e0c7d5a..2285a0ce8f3 100644
--- a/client/distlock.cpp
+++ b/client/distlock.cpp
@@ -523,7 +523,7 @@ namespace mongo {
// For non-finalized locks, timeout 15 minutes since last seen (ts)
// For finalized locks, timeout 15 minutes since last ping
bool recPingChange = o["state"].numberInt() == 2 && ( _lastPingCheck.get<0>() != lastPing["_id"].String() || _lastPingCheck.get<1>() != lastPing["ping"].Date() );
- bool recTSChange = o["state"].numberInt() == 1 && _lastPingCheck.get<3>() != o["ts"].OID();
+ bool recTSChange = _lastPingCheck.get<3>() != o["ts"].OID();
if( recPingChange || recTSChange ) {
// If the ping has changed since we last checked, mark the current date and time