Sitelet https://github.com/phpredis/phpredis/commit/c0793e8b
Skip to content

Commit c0793e8

Browse files
committed
Remove unused parameter lazy_connect from redis_sock_create
1 parent 82c3f8f commit c0793e8

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎cluster_library.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ cluster_node_create(redisCluster *c, char *host, size_t host_len,
652652

653653
// Attach socket
654654
node->sock = redis_sock_create(host, host_len, port, c->timeout,
655-
c->read_timeout, c->persistent, NULL, 0, 1);
655+
c->read_timeout, c->persistent, NULL, 0);
656656

657657
return node;
658658
}
@@ -923,7 +923,7 @@ cluster_init_seeds(redisCluster *cluster, HashTable *ht_seeds) {
923923
// Allocate a structure for this seed
924924
redis_sock = redis_sock_create(str, psep-str,
925925
(unsigned short)atoi(psep+1), cluster->timeout,
926-
cluster->read_timeout, cluster->persistent, NULL, 0, 0);
926+
cluster->read_timeout, cluster->persistent, NULL, 0);
927927

928928
// Index this seed by host/port
929929
key_len = snprintf(key, sizeof(key), "%s:%u", ZSTR_VAL(redis_sock->host),

‎library.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ PHP_REDIS_API RedisSock*
16901690
redis_sock_create(char *host, int host_len, unsigned short port,
16911691
double timeout, double read_timeout,
16921692
int persistent, char *persistent_id,
1693-
long retry_interval, zend_bool lazy_connect)
1693+
long retry_interval)
16941694
{
16951695
RedisSock *redis_sock;
16961696

‎library.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ PHP_REDIS_API void redis_info_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock *
4242
PHP_REDIS_API void redis_parse_info_response(char *response, zval *z_ret);
4343
PHP_REDIS_API void redis_parse_client_list_response(char *response, zval *z_ret);
4444
PHP_REDIS_API void redis_type_response(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, zval *z_tab, void *ctx);
45-
PHP_REDIS_API RedisSock* redis_sock_create(char *host, int host_len, unsigned short port, double timeout, double read_timeout, int persistent, char *persistent_id, long retry_interval, zend_bool lazy_connect);
45+
PHP_REDIS_API RedisSock* redis_sock_create(char *host, int host_len, unsigned short port, double timeout, double read_timeout, int persistent, char *persistent_id, long retry_interval);
4646
PHP_REDIS_API int redis_sock_connect(RedisSock *redis_sock TSRMLS_DC);
4747
PHP_REDIS_API int redis_sock_server_open(RedisSock *redis_sock TSRMLS_DC);
4848
PHP_REDIS_API int redis_sock_disconnect(RedisSock *redis_sock, int force TSRMLS_DC);

‎redis.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ redis_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
970970
}
971971

972972
redis->sock = redis_sock_create(host, host_len, port, timeout, read_timeout, persistent,
973-
persistent_id, retry_interval, 0);
973+
persistent_id, retry_interval);
974974

975975
if (redis_sock_server_open(redis->sock TSRMLS_CC) < 0) {
976976
if (redis->sock->err) {

‎redis_array_impl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts, long retry_interval, zend_bool b
7272
redis = PHPREDIS_GET_OBJECT(redis_object, &ra->redis[i]);
7373

7474
/* create socket */
75-
redis->sock = redis_sock_create(host, host_len, port, ra->connect_timeout, ra->read_timeout, ra->pconnect, NULL, retry_interval, b_lazy_connect);
75+
redis->sock = redis_sock_create(host, host_len, port, ra->connect_timeout, ra->read_timeout, ra->pconnect, NULL, retry_interval);
7676

7777
if (!b_lazy_connect)
7878
{

‎redis_session.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,15 +512,15 @@ PS_OPEN_FUNC(redis)
512512
RedisSock *redis_sock;
513513
if (url->host) {
514514
#if (PHP_VERSION_ID < 70300)
515-
redis_sock = redis_sock_create(url->host, strlen(url->host), url->port, timeout, read_timeout, persistent, persistent_id, retry_interval, 0);
515+
redis_sock = redis_sock_create(url->host, strlen(url->host), url->port, timeout, read_timeout, persistent, persistent_id, retry_interval);
516516
#else
517-
redis_sock = redis_sock_create(ZSTR_VAL(url->host), ZSTR_LEN(url->host), url->port, timeout, read_timeout, persistent, persistent_id, retry_interval, 0);
517+
redis_sock = redis_sock_create(ZSTR_VAL(url->host), ZSTR_LEN(url->host), url->port, timeout, read_timeout, persistent, persistent_id, retry_interval);
518518
#endif
519519
} else { /* unix */
520520
#if (PHP_VERSION_ID < 70300)
521-
redis_sock = redis_sock_create(url->path, strlen(url->path), 0, timeout, read_timeout, persistent, persistent_id, retry_interval, 0);
521+
redis_sock = redis_sock_create(url->path, strlen(url->path), 0, timeout, read_timeout, persistent, persistent_id, retry_interval);
522522
#else
523-
redis_sock = redis_sock_create(ZSTR_VAL(url->path), ZSTR_LEN(url->path), 0, timeout, read_timeout, persistent, persistent_id, retry_interval, 0);
523+
redis_sock = redis_sock_create(ZSTR_VAL(url->path), ZSTR_LEN(url->path), 0, timeout, read_timeout, persistent, persistent_id, retry_interval);
524524
#endif
525525
}
526526
redis_pool_add(pool, redis_sock, weight, database, prefix, auth TSRMLS_CC);

0 commit comments

Comments
 (0)