From d998feb13cf2970ed9e1dbb721151fc4f8e153fc Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Fri, 4 Jan 2013 15:23:03 -0800 Subject: [PATCH] Don't start a publish thread if there's nothing to publish. --- src/cpp/ripple/LedgerMaster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/ripple/LedgerMaster.cpp b/src/cpp/ripple/LedgerMaster.cpp index aa63876d1..c8eafcb4c 100644 --- a/src/cpp/ripple/LedgerMaster.cpp +++ b/src/cpp/ripple/LedgerMaster.cpp @@ -406,7 +406,7 @@ void LedgerMaster::checkPublish(const uint256& hash, uint32 seq) } } - if (!mPubThread) + if (!mPubLedgers.empty() && !mPubThread) { mPubThread = true; theApp->getJobQueue().addJob(jtPUBLEDGER, boost::bind(&LedgerMaster::pubThread, this));