Fixed a ridiculous issue where world wasn't trying to reconnect to loginservers

This commit is contained in:
Akkadius 2015-12-09 23:21:19 -06:00
parent ffe46bd4d2
commit c2af87431a

View File

@ -481,19 +481,16 @@ int main(int argc, char** argv) {
if (InterserverTimer.Check()) {
InterserverTimer.Start();
database.ping();
// AsyncLoadVariables(dbasync, &database);
ReconnectCounter++;
if (ReconnectCounter >= 12) { // only create thread to reconnect every 10 minutes. previously we were creating a new thread every 10 seconds
ReconnectCounter = 0;
if (loginserverlist.AllConnected() == false) {
if (loginserverlist.AllConnected() == false) {
#ifdef _WINDOWS
_beginthread(AutoInitLoginServer, 0, nullptr);
_beginthread(AutoInitLoginServer, 0, nullptr);
#else
pthread_t thread;
pthread_create(&thread, nullptr, &AutoInitLoginServer, nullptr);
pthread_t thread;
pthread_create(&thread, nullptr, &AutoInitLoginServer, nullptr);
#endif
}
}
}
if (numclients == 0) {
Sleep(50);