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