ing
This commit is contained in:
parent
ffeccef8d8
commit
ba6bb15295
|
@ -52,8 +52,10 @@ func (sh *ServerHandlers) Listen(serverCTX server.ServerContext) (net.Listener,
|
||||||
func (sh *ServerHandlers) OnStart(serverCTX server.ServerContext) {
|
func (sh *ServerHandlers) OnStart(serverCTX server.ServerContext) {
|
||||||
sh.ServerHandlers.OnStart(serverCTX)
|
sh.ServerHandlers.OnStart(serverCTX)
|
||||||
|
|
||||||
if err := os.Remove(sh.pidPath); nil != err {
|
if _, err := os.Stat(sh.pidPath); os.IsExist(err) {
|
||||||
logging.Logger().Errorf("Container: Removing pid file has been failed [%v]", err)
|
if err := os.Remove(sh.pidPath); nil != err {
|
||||||
|
logging.Logger().Errorf("Container: Removing pid file has been failed [%v]", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s := strconv.FormatInt(int64(sh.port), 10)
|
s := strconv.FormatInt(int64(sh.port), 10)
|
||||||
|
@ -61,8 +63,10 @@ func (sh *ServerHandlers) OnStart(serverCTX server.ServerContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sh *ServerHandlers) OnStop(serverCTX server.ServerContext) {
|
func (sh *ServerHandlers) OnStop(serverCTX server.ServerContext) {
|
||||||
if err := os.Remove(sh.pidPath); nil != err {
|
if _, err := os.Stat(sh.pidPath); os.IsExist(err) {
|
||||||
logging.Logger().Errorf("Container: Removing pid file has been failed [%v]", err)
|
if err := os.Remove(sh.pidPath); nil != err {
|
||||||
|
logging.Logger().Errorf("Container: Removing pid file has been failed [%v]", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sh.ServerHandlers.OnStop(serverCTX)
|
sh.ServerHandlers.OnStop(serverCTX)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user