Explorar el Código

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

Xiang Li hace 10 años
padre
commit
e316678a4d
Se han modificado 1 ficheros con 1 adiciones y 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
 		}