Răsfoiți Sursa

Temp object was being destroyed before connection was used

Grant Limberg 5 ani în urmă
părinte
comite
08cb72bdba
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      controller/PostgreSQL.cpp

+ 2 - 1
controller/PostgreSQL.cpp

@@ -1666,7 +1666,8 @@ void PostgreSQL::onlineNotification_Redis()
 		try {
 		try {
 			if (!lastOnline.empty()) {
 			if (!lastOnline.empty()) {
 				if (_rc->clusterMode) {
 				if (_rc->clusterMode) {
-					auto tx = _cluster->redis(controllerId).transaction(true);
+					auto redis = _cluster->redis(controllerId);
+					auto tx = redis.transaction(true);
 					_doRedisUpdate(tx, controllerId, lastOnline);
 					_doRedisUpdate(tx, controllerId, lastOnline);
 				} else {
 				} else {
 					auto tx = _redis->transaction(true);
 					auto tx = _redis->transaction(true);