Merge pull request #3925 from filecoin-project/feat/log-shutdown
log shutdown method for lotus daemon and miner
This commit is contained in:
commit
6050401652
@ -163,8 +163,10 @@ var runCmd = &cli.Command{
|
|||||||
sigChan := make(chan os.Signal, 2)
|
sigChan := make(chan os.Signal, 2)
|
||||||
go func() {
|
go func() {
|
||||||
select {
|
select {
|
||||||
case <-sigChan:
|
case sig := <-sigChan:
|
||||||
|
log.Warnw("received shutdown", "signal", sig)
|
||||||
case <-shutdownChan:
|
case <-shutdownChan:
|
||||||
|
log.Warn("received shutdown")
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Warn("Shutting down...")
|
log.Warn("Shutting down...")
|
||||||
|
@ -66,8 +66,10 @@ func serveRPC(a api.FullNode, stop node.StopFunc, addr multiaddr.Multiaddr, shut
|
|||||||
shutdownDone := make(chan struct{})
|
shutdownDone := make(chan struct{})
|
||||||
go func() {
|
go func() {
|
||||||
select {
|
select {
|
||||||
case <-sigCh:
|
case sig := <-sigCh:
|
||||||
|
log.Warnw("received shutdown", "signal", sig)
|
||||||
case <-shutdownCh:
|
case <-shutdownCh:
|
||||||
|
log.Warn("received shutdown")
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Warn("Shutting down...")
|
log.Warn("Shutting down...")
|
||||||
|
Loading…
Reference in New Issue
Block a user