Skip to content
Merged
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
7 changes: 1 addition & 6 deletions ext/pgsql/pgsql.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)

/* try to find if we already have this link in our persistent list */
if ((le = zend_hash_find_ptr(&EG(persistent_list), str.s)) == NULL) { /* we don't */
newpconn:
if (PGG(max_links) != -1 && PGG(num_links) >= PGG(max_links)) {
php_error_docref(NULL, E_WARNING,
"Cannot create new link. Too many open links (" ZEND_LONG_FMT ")", PGG(num_links));
Expand Down Expand Up @@ -720,11 +719,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
while ((pg_result = PQgetResult(le->ptr))) {
PQclear(pg_result);
}
PQfinish(le->ptr);
le->ptr = NULL;
PGG(num_links)--;
PGG(num_persistent)--;
goto newpconn;
PQreset(le->ptr);
}
/* ensure that the link did not die */
if (PGG(auto_reset_persistent) & 1) {
Expand Down