Browse Source

feat: etcd client 补上 close

lihf 8 months ago
parent
commit
c751549bcc
1 changed files with 1 additions and 0 deletions
  1. 1 0
      cmd/server/main.go

+ 1 - 0
cmd/server/main.go

@@ -87,6 +87,7 @@ func main() {
 	if err != nil {
 	if err != nil {
 		panic(err)
 		panic(err)
 	}
 	}
+	defer etcdClient.Close()
 
 
 	// 配置中心
 	// 配置中心
 	bc, err := conf.InitConfig([]conf.Source{ // 优先级从低到高
 	bc, err := conf.InitConfig([]conf.Source{ // 优先级从低到高