Avoid redundant unlock

This commit is contained in:
David Schwartz
2014-03-31 09:09:17 -07:00
parent 5a21269da4
commit 14830c7cb4

View File

@@ -3900,6 +3900,7 @@ Json::Value RPCHandler::doSubscribe (Json::Value params, Resource::Charge& loadT
}
}
bool bHaveMasterLock = true;
if (!params.isMember ("books"))
{
nothing ();
@@ -4010,7 +4011,11 @@ Json::Value RPCHandler::doSubscribe (Json::Value params, Resource::Charge& loadT
if (bSnapshot)
{
masterLockHolder.unlock ();
if (bHaveMasterLock)
{
masterLockHolder.unlock ();
bHaveMasterLock = false;
}
loadType = Resource::feeMediumBurdenRPC;
Ledger::pointer lpLedger = getApp().getLedgerMaster ().getPublishedLedger ();