mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 03:35:19 +00:00
docs: remove unnecessary os.Exit calls at the end of main (#7861)
The main function defers some things that do not run in the "normal" exit case because we call os.Exit(0) explicitly. Since falling off the end of main does the same thing, and also permits defers to run, let's do that.
This commit is contained in:
@@ -384,7 +384,6 @@ func main() {
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||
<-c
|
||||
os.Exit(0)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -425,7 +424,6 @@ defer server.Stop()
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||
<-c
|
||||
os.Exit(0)
|
||||
```
|
||||
|
||||
## 1.5 Getting Up and Running
|
||||
|
||||
Reference in New Issue
Block a user