liujiandao
2023-11-14 2f32021ab211cd901e36c4cbc5875f0f072385bb
main.go
@@ -46,6 +46,7 @@
   //启动grpc客户端
   go controllers.InitInventoryOrderServiceConn()
   go controllers.InitProductInventoryServiceConn()
   go controllers.InitCodeServiceConn()
   //启动grpc服务
   go func() {
      ln, err := net.Listen("tcp", ":"+conf.WebConf.GrpcPort)
@@ -78,6 +79,7 @@
   controllers.CloseInventoryOrderServiceConn()
   controllers.CloseProductInventoryServiceConn()
   controllers.CloseCodeServiceConn()
   // 关闭HTTP服务器
   if err := server.Shutdown(ctx); err != nil {
      logx.Infof("服务优雅退出失败: %v", err)