houston 버전 관리

This commit is contained in:
2023-06-29 12:05:11 +09:00
parent a8821b694b
commit 02db65e06f
5 changed files with 90 additions and 76 deletions

View File

@ -186,9 +186,7 @@ func (hs *houstonServer) Start() error {
go func() {
hc.Start()
logger.Println("houstonClient is finished")
if atomic.AddInt32(&closeCount, 1) == 1 {
logger.Println("try stop houstonServer")
hs.Stop()
}
}()
@ -197,11 +195,9 @@ func (hs *houstonServer) Start() error {
err = hs.rpcServer.Serve(lis)
if atomic.AddInt32(&closeCount, 1) == 1 {
if hc != nil {
logger.Println("try stop houstonClient")
hc.Shutdown()
}
}
logger.Println("houstonServer is finished")
return err
}