diff options
author | dchill42 <dchill42@gmail.com> | 2012-08-27 17:57:31 +0200 |
---|---|---|
committer | dchill42 <dchill42@gmail.com> | 2012-08-27 17:57:31 +0200 |
commit | 62ece3359211482dc5671b9521454608ad226840 (patch) | |
tree | d80aac29baaad6e9b51e865dc3ab7367c40077d4 /system/database/drivers/postgre | |
parent | aee9265602c3bb30a1f7f3dfd562b9b36cc612a4 (diff) | |
parent | 2d5c209943ef1e2644504e8d5cb32d3d66b45632 (diff) |
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into session
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 10 |
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; } // -------------------------------------------------------------------- |