mirror of
https://github.com/anope/anope.git
synced 2026-06-28 18:36:39 +02:00
Check noexpire/readonly in expire_all(), not the mainloop. Otherwise, expiry will happen on shutdown.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1935 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+9
-2
@@ -100,6 +100,12 @@ static int started = 0;
|
||||
|
||||
extern void expire_all()
|
||||
{
|
||||
if (noexpire || readonly)
|
||||
{
|
||||
// Definitely *do not* want.
|
||||
return;
|
||||
}
|
||||
|
||||
waiting = -30;
|
||||
send_event(EVENT_DB_EXPIRE, 1, EVENT_START);
|
||||
waiting = -3;
|
||||
@@ -542,8 +548,9 @@ int main(int ac, char **av, char **envp)
|
||||
if (debug >= 2)
|
||||
alog("debug: Top of main loop");
|
||||
|
||||
if (!noexpire && !readonly
|
||||
&& (save_data || t - last_expire >= ExpireTimeout)) {
|
||||
// Never fear. noexpire/readonly are checked in expire_all().
|
||||
if (save_data || t - last_expire >= ExpireTimeout)
|
||||
{
|
||||
expire_all();
|
||||
last_expire = t;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user