mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Fixed the first world connection being slow
This commit is contained in:
@@ -102,7 +102,7 @@ extern int main(int argc, char** argv)
|
||||
cfg_file = argv[c];
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _WIN32
|
||||
if (strcmp(argv[c], "-s") == 0) // Services
|
||||
{
|
||||
if (++c >= argc)
|
||||
@@ -134,7 +134,7 @@ extern int main(int argc, char** argv)
|
||||
|
||||
if (strcmp(argv[c], "--service") == 0)
|
||||
WinServiceRun();
|
||||
#endif
|
||||
#endif
|
||||
++c;
|
||||
}
|
||||
|
||||
@@ -168,6 +168,11 @@ extern int main(int argc, char** argv)
|
||||
|
||||
OpenSSLCrypto::threadsSetup();
|
||||
|
||||
// Seed the OpenSSL's PRNG here.
|
||||
// That way it won't auto-seed when calling BigNumber::SetRand and slow down the first world login
|
||||
BigNumber seed;
|
||||
seed.SetRand(16 * 8);
|
||||
|
||||
/// worldserver PID file creation
|
||||
std::string pidFile = sConfigMgr->GetStringDefault("PidFile", "");
|
||||
if (!pidFile.empty())
|
||||
|
||||
Reference in New Issue
Block a user