Shutdown cleanly on control-C.

This commit is contained in:
JoelKatz
2012-11-28 20:49:07 -08:00
parent 72777b6b83
commit 5cf15b3f4e
2 changed files with 24 additions and 0 deletions

View File

@@ -644,8 +644,16 @@ void LedgerConsensus::stateAccepted()
endConsensus();
}
extern volatile bool doShutdown;
void LedgerConsensus::timerEntry()
{
if (doShutdown)
{
cLog(lsFATAL) << "Shutdown requested";
theApp->stop();
}
if ((mState != lcsFINISHED) && (mState != lcsACCEPTED))
checkLCL();