Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatricio.dorantes <patricio@amxiniciativas.com>2022-08-01 19:16:24 +0300
committerpatricio.dorantes <patricio@amxiniciativas.com>2022-08-01 19:16:24 +0300
commited10f365e758787d75b909cff1b677c3028085f4 (patch)
treebfb79c892577c9f4644e328083fa35353f750ab0
parent8159048b589376d7661fd6aaff283a93e877f4c0 (diff)
fix redis session standalone stream ssl context
-rw-r--r--redis_session.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/redis_session.c b/redis_session.c
index 19ae712f..95af257d 100644
--- a/redis_session.c
+++ b/redis_session.c
@@ -380,7 +380,7 @@ static void lock_release(RedisSock *redis_sock, redis_session_lock_status *lock_
PS_OPEN_FUNC(redis)
{
php_url *url;
- zval params;
+ zval params, *context;
int i, j, path_len;
redis_pool *pool = ecalloc(1, sizeof(*pool));
@@ -451,6 +451,7 @@ PS_OPEN_FUNC(redis)
REDIS_CONF_AUTH_STATIC(ht, "auth", &user, &pass);
zval_dtor(&params);
+ context = REDIS_HASH_STR_FIND_TYPE_STATIC(ht, "stream", IS_ARRAY);
}
if ((url->path == NULL && url->host == NULL) || weight <= 0 || timeout <= 0) {
@@ -490,6 +491,10 @@ PS_OPEN_FUNC(redis)
persistent, persistent_id ? ZSTR_VAL(persistent_id) : NULL,
retry_interval);
+ if (context != NULL) {
+ redis_sock_set_stream_context(redis_sock, context);
+ }
+
redis_pool_add(pool, redis_sock, weight, db);
redis_sock->prefix = prefix;
redis_sock_set_auth(redis_sock, user, pass);