mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
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:
parent
514f3cf266
commit
02ddff84f4
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue