From dbd27f930b3a73bad4c956bea61e83bc017160f4 Mon Sep 17 00:00:00 2001 From: Stefan Mititelu Date: Mon, 3 Feb 2020 17:44:22 +0200 Subject: [PATCH] Fix crash when redis disconnects/reconnects --- daemon/redis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/redis.c b/daemon/redis.c index 578f550c2..fb43d3ccd 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -572,7 +572,6 @@ static int redis_notify(void) { } static void redis_disconnect(void) { - redisAsyncDisconnect(rtpe_redis_notify_async_context); rtpe_redis_notify_async_context = NULL; } @@ -634,6 +633,7 @@ void redis_notify_loop(void *d) { redis_notify_subscribe_action(UNSUBSCRIBE_ALL, 0); // free async context + redisAsyncDisconnect(rtpe_redis_notify_async_context); redis_disconnect(); }