Skip to content

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

fix: mssql close (#15178)

p0nyd5e95130079e
diff --git a/backend/plugin/db/mssql/mssql.go b/backend/plugin/db/mssql/mssql.go
index 9c9bd705d7..7beef9a79d 100644
--- a/backend/plugin/db/mssql/mssql.go
+++ b/backend/plugin/db/mssql/mssql.go
@@ -120,9 +120,12 @@ func (driver *Driver) Open(_ context.Context, _ storepb.Engine, config db.Connec
func (driver *Driver) Close(_ context.Context) error {
if driver.certFilePath != "" {
if err := os.Remove(driver.certFilePath); err != nil {
- slog.Warn("failed to delete temporary file", slog.String("path", driver.certFilePath), slog.Any("error", err))
+ slog.Warn("failed to delete temporary file", slog.String("path", driver.certFilePath), log.BBError(err))
}
}
+ if driver.db != nil {
+ return driver.db.Close()
+ }
return nil
}