mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Fix external grpc server doesn't graceful stop (#28310)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
c8cab4dfc3
commit
f2e972abb3
@ -649,18 +649,25 @@ func (s *Server) Stop() error {
|
||||
gracefulWg.Add(1)
|
||||
go func() {
|
||||
defer gracefulWg.Done()
|
||||
if s.grpcInternalServer != nil {
|
||||
utils.GracefulStopGRPCServer(s.grpcInternalServer)
|
||||
}
|
||||
|
||||
if s.tcpServer != nil {
|
||||
log.Info("Graceful stop Proxy tcp server...")
|
||||
log.Info("Proxy stop tcp server...")
|
||||
s.tcpServer.Close()
|
||||
} else if s.grpcExternalServer != nil {
|
||||
}
|
||||
|
||||
if s.grpcExternalServer != nil {
|
||||
log.Info("Proxy stop external grpc server")
|
||||
utils.GracefulStopGRPCServer(s.grpcExternalServer)
|
||||
if s.httpServer != nil {
|
||||
log.Info("Graceful stop grpc http server...")
|
||||
s.httpServer.Close()
|
||||
}
|
||||
}
|
||||
|
||||
if s.httpServer != nil {
|
||||
log.Info("Proxy stop http server...")
|
||||
s.httpServer.Close()
|
||||
}
|
||||
|
||||
if s.grpcInternalServer != nil {
|
||||
log.Info("Proxy stop internal grpc server")
|
||||
utils.GracefulStopGRPCServer(s.grpcInternalServer)
|
||||
}
|
||||
}()
|
||||
gracefulWg.Wait()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user