mirror of
https://github.com/beego/bee.git
synced 2024-11-23 22:10:54 +00:00
Remove comments and add error handling
This commit is contained in:
parent
8252ea9f88
commit
87a287cac2
@ -183,7 +183,6 @@ func Kill() {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
if cmd != nil && cmd.Process != nil {
|
if cmd != nil && cmd.Process != nil {
|
||||||
//err := cmd.Process.Kill()
|
|
||||||
cmd.Process.Signal(os.Interrupt)
|
cmd.Process.Signal(os.Interrupt)
|
||||||
ch := make(chan struct{}, 1)
|
ch := make(chan struct{}, 1)
|
||||||
go func() {
|
go func() {
|
||||||
@ -195,7 +194,10 @@ func Kill() {
|
|||||||
return
|
return
|
||||||
case <-time.After(10 * time.Second):
|
case <-time.After(10 * time.Second):
|
||||||
beeLogger.Log.Info("Timeout; Force kill cmd process")
|
beeLogger.Log.Info("Timeout; Force kill cmd process")
|
||||||
cmd.Process.Kill()
|
err := cmd.Process.Kill()
|
||||||
|
if err != nil {
|
||||||
|
beeLogger.Log.Errorf("Error while killing cmd process: %s", err)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user