瀏覽代碼

feat: etcd client 补上 close

lihf 8 月之前
父節點
當前提交
c751549bcc
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      cmd/server/main.go

+ 1 - 0
cmd/server/main.go

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