diff options
author | Sadie Powell <sadie@witchery.services> | 2024-11-19 00:18:16 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-11-19 00:39:00 +0000 |
commit | 7083c424c25e797a8ffbded27ecb4fc8f93e0dd3 (patch) | |
tree | 1ba3d431cc8bb999ec4307a7cca5ee4bcc78cf7d /modules | |
parent | de16238e019223eb1b06eb791ec2abdf29b8700c (diff) |
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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/database/db_sql.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index c02edd8aa..1964d136f 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -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; |