Skip to content

Commit 99b1031

Browse files
ping-yeepaulbalandan
authored andcommitted
fix: fix the reconnect function.
1 parent d81f4c5 commit 99b1031

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)