1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 06:36:39 +02:00

Execute SQL updates atomically.

If the Serialize call alters any tables they would have previously
been missed here.
This commit is contained in:
Sadie Powell
2025-03-30 13:01:13 +01:00
parent a154532e98
commit 4024598bd8
2 changed files with 8 additions and 5 deletions
+4 -2
View File
@@ -109,7 +109,10 @@ public:
void OnNotify() override
{
for (auto *obj : this->updated_items)
std::set<Serializable *> items;
std::swap(this->updated_items, items);
for (auto *obj : items)
{
if (this->sql)
{
@@ -154,7 +157,6 @@ public:
}
}
this->updated_items.clear();
this->imported = true;
}