From 08cb72bdba5bb20b5244af09445d71b0b12e727b Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Thu, 21 May 2020 09:33:03 -0700 Subject: [PATCH] Temp object was being destroyed before connection was used --- controller/PostgreSQL.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp index 1e59365ad..a9915ee11 100644 --- a/controller/PostgreSQL.cpp +++ b/controller/PostgreSQL.cpp @@ -1666,7 +1666,8 @@ void PostgreSQL::onlineNotification_Redis() try { if (!lastOnline.empty()) { if (_rc->clusterMode) { - auto tx = _cluster->redis(controllerId).transaction(true); + auto redis = _cluster->redis(controllerId); + auto tx = redis.transaction(true); _doRedisUpdate(tx, controllerId, lastOnline); } else { auto tx = _redis->transaction(true);