mirror of
https://github.com/php/php-src.git
synced 2025-01-24 12:43:38 +08:00
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #78982: pdo_pgsql returns dead persistent connection
This commit is contained in:
commit
ed372541da
@ -471,7 +471,7 @@ static int pdo_pgsql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_
|
||||
static int pdo_pgsql_check_liveness(pdo_dbh_t *dbh)
|
||||
{
|
||||
pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data;
|
||||
if (PQstatus(H->server) == CONNECTION_BAD) {
|
||||
if (!PQconsumeInput(H->server) || PQstatus(H->server) == CONNECTION_BAD) {
|
||||
PQreset(H->server);
|
||||
}
|
||||
return (PQstatus(H->server) == CONNECTION_OK) ? SUCCESS : FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user