aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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())