1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 07:16: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 -3
View File
@@ -89,7 +89,10 @@ public:
if (!this->CheckInit())
return;
for (auto *obj : this->updated_items)
std::set<Serializable *> items;
std::swap(this->updated_items, items);
for (auto *obj : items)
{
if (obj && this->SQL)
{
@@ -118,8 +121,6 @@ public:
}
}
}
this->updated_items.clear();
}
EventReturn OnLoadDatabase() override