mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-06 03:50:46 +00:00
Revert "docs: fix graceful shutdown in go built-in example"
This reverts commit cbf5511b02.
This commit is contained in:
@@ -380,13 +380,14 @@ func main() {
|
||||
}
|
||||
|
||||
node.Start()
|
||||
defer func() {
|
||||
node.Stop()
|
||||
node.Wait()
|
||||
}()
|
||||
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||
<-c
|
||||
|
||||
node.Stop()
|
||||
node.Wait()
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
@@ -555,13 +556,14 @@ upon receiving SIGTERM or Ctrl-C.
|
||||
|
||||
```go
|
||||
node.Start()
|
||||
defer func() {
|
||||
node.Stop()
|
||||
node.Wait()
|
||||
}()
|
||||
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||
<-c
|
||||
|
||||
node.Stop()
|
||||
node.Wait()
|
||||
os.Exit(0)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user