Skip to content

Commit

Permalink
Allow to reset active db connection (#859)
Browse files Browse the repository at this point in the history
resolves #805
  • Loading branch information
nilmerg authored Sep 12, 2023
2 parents 84eeeaa + 0a31add commit cf957fb
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions library/Icingadb/ProvidedHook/X509/Sni.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ class Sni extends SniHook
*/
public function getHosts(Filter $filter = null): Generator
{
$queryHost = Host::on($this->getDb());

$queryHost->getSelectBase();

$hostStatusCols = [
'host_name' => 'name',
'host_address' => 'address',
'host_address6' => 'address6'
];

$queryHost = $queryHost->columns($hostStatusCols);
$this->getDb()->ping();

$queryHost = Host::on($this->getDb())
->columns([
'host_name' => 'name',
'host_address' => 'address',
'host_address6' => 'address6'
]);

$this->applyRestrictions($queryHost);

Expand Down

0 comments on commit cf957fb

Please sign in to comment.