Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: ensure API client Close is called to clean up idle connections (#18539)

p0ny5db18bb27b32
diff --git a/action/command/check.go b/action/command/check.go
index 297607afb5..943a2ef291 100644
--- a/action/command/check.go
+++ b/action/command/check.go
@@ -57,6 +57,7 @@ func runCheck(w *world.World) func(*cobra.Command, []string) error {
if err != nil {
return err
}
+ defer client.Close()
// Check version compatibility
CheckVersionCompatibility(w, client, args.Version)
diff --git a/action/command/rollout.go b/action/command/rollout.go
index 3ddb1048d7..f296c4982a 100644
--- a/action/command/rollout.go
+++ b/action/command/rollout.go
@@ -61,6 +61,7 @@ func runRollout(w *world.World) func(command *cobra.Command, _ []string) error {
if err != nil {
return errors.Wrapf(err, "failed to create client")
}
+ defer client.Close()
// Check version compatibility
CheckVersionCompatibility(w, client, args.Version)