Skip to content

Commit

Permalink
make it exit gracefully. (cosmos#8101)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Alessio Treglia <[email protected]>
  • Loading branch information
3 people authored Dec 10, 2020
1 parent 02fb3a3 commit c0f3039
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
}

Expand Down

0 comments on commit c0f3039

Please sign in to comment.