Skip to content

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

Should close the driver if Ping fails in Open

天舟28695fe5350e
diff --git a/plugin/db/driver.go b/plugin/db/driver.go
index 24d83eab08..c063b1b885 100644
--- a/plugin/db/driver.go
+++ b/plugin/db/driver.go
@@ -350,6 +350,7 @@ func Open(dbType Type, driverConfig DriverConfig, connectionConfig ConnectionCon
}
if err := driver.Ping(context.Background()); err != nil {
+ driver.Close(context.Background())
return nil, err
}