From 5edb596fcaaee3987166ab6840e326dc07a197ea Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 26 Aug 2020 13:52:51 -0400 Subject: [PATCH] add missing Redis auth for async context Change-Id: I10d05b5f328a70eb9e71852920502d87f0ba317f (cherry picked from commit f8f74d89b93799f0b513fc1ea67b0d7846d71172) --- daemon/redis.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/daemon/redis.c b/daemon/redis.c index 4c7177435..11d10ddcc 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -557,6 +557,13 @@ static int redis_notify(void) { return -1; } + if (rtpe_redis_notify->auth) { + if (redisAsyncCommand(rtpe_redis_notify_async_context, on_redis_notification, NULL, "AUTH %s", rtpe_redis_notify->auth) != REDIS_OK) { + rlog(LOG_ERROR, "Fail redisAsyncCommand on AUTH"); + return -1; + } + } + // subscribe to the values in the configured keyspaces rwlock_lock_r(&rtpe_config.config_lock); for (l = rtpe_config.redis_subscribed_keyspaces.head; l; l = l->next) {