浏览代码

Temp object was being destroyed before connection was used

Grant Limberg 5 年之前
父节点
当前提交
08cb72bdba
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      controller/PostgreSQL.cpp

+ 2 - 1
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);