Merge pull request #794 from tendermint/243-restart-app-via-os

Kill Tendermint when App dies
This commit is contained in:
Ethan Buchman 2017-10-31 16:27:23 -04:00 committed by GitHub
commit ec87c740a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1208,6 +1208,10 @@ func (cs *ConsensusState) finalizeCommit(height int) {
err := stateCopy.ApplyBlock(eventCache, cs.proxyAppConn, block, blockParts.Header(), cs.mempool)
if err != nil {
cs.Logger.Error("Error on ApplyBlock. Did the application crash? Please restart tendermint", "err", err)
err := cmn.Kill()
if err != nil {
cs.Logger.Error("Failed to kill this process - please do so manually", "err", err)
}
return
}