Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions ext/pgsql/pgsql.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,15 +589,17 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
PGG(num_links)++;
PGG(num_persistent)++;
} else { /* we do */
if ((connect_type & PGSQL_CONNECT_FORCE_NEW)) {
if (zend_hash_del(&EG(persistent_list), str.s) != SUCCESS) {
goto err;
}
goto newpconn;
}
if (le->type != le_plink) {
goto err;
}
if ((connect_type & PGSQL_CONNECT_FORCE_NEW)) {
pgsql = (PGconn *) le->ptr;
PQfinish(pgsql);
PGG(num_links)--;
PGG(num_persistent)--;
le->ptr = NULL;
goto newpconn;
}
/* ensure that the link did not die */
if (PGG(auto_reset_persistent) & 1) {
/* need to send & get something from backend to
Expand Down