Skip to content

Commit ccef02b

Browse files
committed
fix: fix the reconnect function.
1 parent 27ae8bb commit ccef02b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/Database/Postgre/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ private function convertDSN()
149149
*/
150150
public function reconnect()
151151
{
152-
if (pg_ping($this->connID) === false) {
153-
$this->connID = false;
152+
if ($this->connID === false || pg_ping($this->connID) === false) {
153+
$this->connect();
154154
}
155155
}
156156

0 commit comments

Comments
 (0)