diff options
author | patricio.dorantes <patricio@amxiniciativas.com> | 2022-08-01 19:16:24 +0300 |
---|---|---|
committer | patricio.dorantes <patricio@amxiniciativas.com> | 2022-08-01 19:16:24 +0300 |
commit | ed10f365e758787d75b909cff1b677c3028085f4 (patch) | |
tree | bfb79c892577c9f4644e328083fa35353f750ab0 | |
parent | 8159048b589376d7661fd6aaff283a93e877f4c0 (diff) |
fix redis session standalone stream ssl context
-rw-r--r-- | redis_session.c | 7 |
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(¶ms); + 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); |