mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[11054] Do not allow async transaction execution while server is loading. Call Database::InitDelayThread() function explicitly to create async DB worker thread after server initialization is complete.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
e6e7bf8573
commit
07c9f0cbb8
9 changed files with 59 additions and 58 deletions
|
|
@ -221,8 +221,10 @@ extern int main(int argc, char **argv)
|
|||
|
||||
// cleanup query
|
||||
// set expired bans to inactive
|
||||
LoginDatabase.BeginTransaction();
|
||||
LoginDatabase.Execute("UPDATE account_banned SET active = 0 WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate");
|
||||
LoginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate");
|
||||
LoginDatabase.CommitTransaction();
|
||||
|
||||
///- Launch the listening network socket
|
||||
ACE_Acceptor<AuthSocket, ACE_SOCK_Acceptor> acceptor;
|
||||
|
|
@ -285,6 +287,9 @@ extern int main(int argc, char **argv)
|
|||
}
|
||||
#endif
|
||||
|
||||
//server has started up successfully => enable async DB requests
|
||||
LoginDatabase.InitDelayThread();
|
||||
|
||||
// maximum counter for next ping
|
||||
uint32 numLoops = (sConfig.GetIntDefault( "MaxPingTime", 30 ) * (MINUTE * 1000000 / 100000));
|
||||
uint32 loopCounter = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue