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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user