Core/Bnetserver: Applied 375363ed08 to bnetserver - fixes a minor development annoyance where first login after startup is slow

This commit is contained in:
Shauren
2015-09-11 17:25:14 +02:00
parent 59eff3fef9
commit 0fda78b679

View File

@@ -114,6 +114,11 @@ int main(int argc, char** argv)
TC_LOG_INFO("server.bnetserver", "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
TC_LOG_INFO("server.bnetserver", "Using Boost version: %i.%i.%i", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
// 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);
// bnetserver PID file creation
std::string pidFile = sConfigMgr->GetStringDefault("PidFile", "");
if (!pidFile.empty())