diff options
author | Subv <subv2112@gmail.com> | 2014-07-09 16:52:41 -0500 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2014-07-09 16:53:15 -0500 |
commit | 375363ed08069b6aa7a921e35fdd1cc7affc946e (patch) | |
tree | 9f0dc34b212068bd93613e9b84f36b9b6eed9f2c | |
parent | dd28f643b2bbf4295e636c7c6c3f03c88e1fd6fe (diff) |
Fixed the first world connection being slow
-rw-r--r-- | src/server/worldserver/Main.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 8df31c5022a..0e7e7064031 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -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()) |