Explorar o código

tools/functional-tester: fix leaky issue by closing conn

Xiang Li %!s(int64=10) %!d(string=hai) anos
pai
achega
e316678a4d
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      tools/functional-tester/etcd-tester/cluster.go

+ 1 - 0
tools/functional-tester/etcd-tester/cluster.go

@@ -269,6 +269,7 @@ func setHealthKey(us []string) error {
 		kvc := pb.NewKVClient(conn)
 		_, err = kvc.Put(ctx, &pb.PutRequest{Key: []byte("health"), Value: []byte("good")})
 		cancel()
+		conn.Close()
 		if err != nil {
 			return err
 		}