/* server died */
}
else {
+ int rsrc_type;
+
/* okay, the connection is open and the server is still alive */
connection->used_this_request = 1;
smart_str_free_ex(&hashed_details, 0);
- if (zend_list_addref(connection->rsrc_id) == FAILURE) {
+ if (zend_list_find(connection->rsrc_id, &rsrc_type) && (rsrc_type == le_pconnection) && zend_list_addref(connection->rsrc_id) == SUCCESS) {
+ /* do nothing */
+ } else {
connection->rsrc_id = zend_list_insert(connection, le_pconnection);
}
return connection;