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 14, 2024
1 parent fcf37d6 commit 04d5f26
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 04d5f26

Please sign in to comment.