1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 09:46:40 +02:00

When object unserialization fails (due to not having dependency objects) bump the ts to try again later.

This commit is contained in:
Adam
2014-07-26 13:24:52 -04:00
parent 3c88f3b8cf
commit 60229b15d2
+5 -2
View File
@@ -166,7 +166,7 @@ class DBMySQL : public Module, public Pipe
if (!this->CheckInit() || obj->GetTimestamp() == Anope::CurTime)
return;
Query query("SELECT * FROM `" + this->prefix + obj->GetName() + "` WHERE (`timestamp` > " + this->SQL->FromUnixtime(obj->GetTimestamp()) + " OR `timestamp` IS NULL)");
Query query("SELECT * FROM `" + this->prefix + obj->GetName() + "` WHERE (`timestamp` >= " + this->SQL->FromUnixtime(obj->GetTimestamp()) + " OR `timestamp` IS NULL)");
obj->UpdateTimestamp();
@@ -228,7 +228,10 @@ class DBMySQL : public Module, public Pipe
}
else
{
delete s;
if (!s)
this->RunQuery("UPDATE `" + prefix + obj->GetName() + "` SET `timestamp` = " + this->SQL->FromUnixtime(obj->GetTimestamp()) + " WHERE `id` = " + stringify(id));
else
delete s;
}
}
}