Skip to content

Commit

Permalink
Merge PR cosmos#4884: Fix standalone execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Treglia authored and alexanderbez committed Aug 11, 2019
1 parent e4c8bd7 commit 8f51fb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .pending/bugfixes/tendermint/_4879-Don-t-terminat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4879 Don't terminate the process immediately after startup when run in standalone mode.
5 changes: 4 additions & 1 deletion server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,17 @@ func startStandAlone(ctx *Context, appCreator AppCreator) error {
cmn.Exit(err.Error())
}

// wait forever
cmn.TrapSignal(ctx.Logger, func() {
// cleanup
err = svr.Stop()
if err != nil {
cmn.Exit(err.Error())
}
})

// run forever (the node will not be returned)
select {}

return nil
}

Expand Down

0 comments on commit 8f51fb3

Please sign in to comment.