make it exit gracefully. (#8101)

* make it exit gracefully.

* add kig message

* git update error code

* exit with error code

* exit with 0

* Update server/start.go

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
This commit is contained in:
Jonathan Gimeno 2020-12-10 12:37:57 +01:00 committed by GitHub
parent 02fb3a3a32
commit c0f3039fc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -115,7 +115,13 @@ which accepts a path for the resulting pprof file.
// amino is needed here for backwards compatibility of REST routes
err := startInProcess(serverCtx, clientCtx, appCreator)
return err
errCode, ok := err.(ErrorCode)
if !ok {
return err
}
serverCtx.Logger.Debug(fmt.Sprintf("received quit signal: %d", errCode.Code))
return nil
},
}