Skip to content

Commit 3fd2cb9

Browse files
committed
fix: change the implementation way and add the changelog.
1 parent 04d5f26 commit 3fd2cb9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

system/Database/Postgre/Connection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ private function convertDSN()
150150
public function reconnect()
151151
{
152152
if ($this->connID === false || pg_ping($this->connID) === false) {
153-
$this->connect();
153+
$this->close();
154+
$this->initialize();
154155
}
155156
}
156157

user_guide_src/source/changelogs/v4.5.6.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Bugs Fixed
4141

4242
- **Routing:** Fixed a TypeError in `str_replace()` when `Routing::$translateURIDashes` is set to `true` and a route is defined using a closure.
4343

44+
- **PostgreSQL Connection:** Fixed bug that PostgreSQL cannot reconnect the database with ``reconnect()`` method.
45+
4446
See the repo's
4547
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_
4648
for a complete list of bugs fixed.

0 commit comments

Comments
 (0)