mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #78980: pgsqlGetNotify() overlooks dead connection
This commit is contained in:
commit
f974f252dd
2 changed files with 20 additions and 2 deletions
|
@ -1068,13 +1068,21 @@ static PHP_METHOD(PDO, pgsqlGetNotify)
|
|||
|
||||
H = (pdo_pgsql_db_handle *)dbh->driver_data;
|
||||
|
||||
PQconsumeInput(H->server);
|
||||
if (!PQconsumeInput(H->server)) {
|
||||
pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, NULL);
|
||||
PDO_HANDLE_DBH_ERR();
|
||||
RETURN_FALSE;
|
||||
}
|
||||
pgsql_notify = PQnotifies(H->server);
|
||||
|
||||
if (ms_timeout && !pgsql_notify) {
|
||||
php_pollfd_for_ms(PQsocket(H->server), PHP_POLLREADABLE, (int)ms_timeout);
|
||||
|
||||
PQconsumeInput(H->server);
|
||||
if (!PQconsumeInput(H->server)) {
|
||||
pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, NULL);
|
||||
PDO_HANDLE_DBH_ERR();
|
||||
RETURN_FALSE;
|
||||
}
|
||||
pgsql_notify = PQnotifies(H->server);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue