1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 07:36:38 +02:00

Only process sockets after loading the db when using db_sql{_live}.

This avoids slow startups for the 95% of users who are using the
db_flatfile database backend.
This commit is contained in:
Sadie Powell
2024-11-19 00:18:16 +00:00
parent de16238e01
commit 7083c424c2
2 changed files with 8 additions and 1 deletions
+8
View File
@@ -159,6 +159,14 @@ class DBSQL : public Module, public Pipe
this->import = block->Get<bool>("import");
}
void OnPostInit() anope_override
{
// If we are importing from flatfile we need to force a socket engine
// flush to ensure it actually gets written to the database before we
// connect to the uplink.
SocketEngine::Process();
}
void OnShutdown() anope_override
{
this->shutting_down = true;