Fixed the first world connection being slow

This commit is contained in:
Subv
2014-07-09 16:52:41 -05:00
parent dd28f643b2
commit 375363ed08

View File

@@ -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())