summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre/postgre_driver.php
diff options
context:
space:
mode:
authorEric Roberts <eric@cryode.com>2012-08-03 22:39:04 +0200
committerEric Roberts <eric@cryode.com>2012-08-03 22:39:04 +0200
commit17636e8bb20a4d53fec8fd8aaf530f53bd22d612 (patch)
treea844b9aff5ecb42ce2c49ea4e187ef44cc4d39a8 /system/database/drivers/postgre/postgre_driver.php
parentda038d2ebccb4d45ea6d819c914563b2bc009a86 (diff)
parent6c94c2dcfb6557947c9ac67e419b2856fd80e01d (diff)
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/postgre/postgre_driver.php')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 031740851..8c11c477b 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -132,7 +132,15 @@ class CI_DB_postgre_driver extends CI_DB {
*/
public function db_pconnect()
{
- return @pg_pconnect($this->dsn);
+ $conn = @pg_pconnect($this->dsn);
+ if ($conn && pg_connection_status($conn) === PGSQL_CONNECTION_BAD)
+ {
+ if (pg_ping($conn) === FALSE)
+ {
+ return FALSE;
+ }
+ }
+ return $conn;
}
// --------------------------------------------------------------------