mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-15 21:58:21 +00:00
one more spot
This commit is contained in:
@ -485,18 +485,20 @@ void PostgreSQL::initializeMembers(PGconn *conn)
|
|||||||
deletes.insert(key);
|
deletes.insert(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_rc->clusterMode) {
|
if (!deletes.empty()) {
|
||||||
auto tx = _cluster->transaction(_myAddressStr, true);
|
if (_rc->clusterMode) {
|
||||||
for (std::string k : deletes) {
|
auto tx = _cluster->transaction(_myAddressStr, true);
|
||||||
tx.del(k);
|
for (std::string k : deletes) {
|
||||||
|
tx.del(k);
|
||||||
|
}
|
||||||
|
tx.exec();
|
||||||
|
} else {
|
||||||
|
auto tx = _redis->transaction(true);
|
||||||
|
for (std::string k : deletes) {
|
||||||
|
tx.del(k);
|
||||||
|
}
|
||||||
|
tx.exec();
|
||||||
}
|
}
|
||||||
tx.exec();
|
|
||||||
} else {
|
|
||||||
auto tx = _redis->transaction(true);
|
|
||||||
for (std::string k : deletes) {
|
|
||||||
tx.del(k);
|
|
||||||
}
|
|
||||||
tx.exec();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user