aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver/Main.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2014-07-09 16:52:41 -0500
committerSubv <subv2112@gmail.com>2014-07-09 16:53:15 -0500
commit375363ed08069b6aa7a921e35fdd1cc7affc946e (patch)
tree9f0dc34b212068bd93613e9b84f36b9b6eed9f2c /src/server/worldserver/Main.cpp
parentdd28f643b2bbf4295e636c7c6c3f03c88e1fd6fe (diff)
Fixed the first world connection being slow
Diffstat (limited to 'src/server/worldserver/Main.cpp')
-rw-r--r--src/server/worldserver/Main.cpp9
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())