Skip to content

Commit

Permalink
fix: fix the reconnect function.
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-yee committed Nov 18, 2024
1 parent 27ae8bb commit ccef02b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/Database/Postgre/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ private function convertDSN()
*/
public function reconnect()
{
if (pg_ping($this->connID) === false) {
$this->connID = false;
if ($this->connID === false || pg_ping($this->connID) === false) {
$this->connect();
}
}

Expand Down

0 comments on commit ccef02b

Please sign in to comment.