SlaReport: Disconnect from the database when done

This hook usually runs isolated and no-one else requires a connection.
Makes only a difference in case of reporting triggering this as part
of a scheduled report and prevents the database connection from being
left open unnecessarily and failing upon re-use.

(cherry picked from commit e56d8a68ca)
This commit is contained in:
Johannes Meyer 2026-02-26 10:58:19 +01:00
parent 514f3cf266
commit 02ddff84f4

View file

@ -127,6 +127,11 @@ abstract class SlaReport extends ReportHook
$rd->setRows($rows);
// Disconnect from the database, as this hook usually runs isolated and no-one else requires a connection.
// Makes only a difference in case of reporting triggering this as part of a scheduled report and prevents
// the database connection from being left open unnecessarily and failing upon re-use.
$this->getDb()->disconnect();
return $rd;
}