mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
[Crash] Fix Repop Race Condition Crash (#4814)
* [Crash] Fix Repop Race Condition Crash * True fix
This commit is contained in:
parent
5b9f7ff4c9
commit
fe08961d25
@ -501,6 +501,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
Timer InterserverTimer(INTERSERVER_TIMER); // does MySQL pings and auto-reconnect
|
Timer InterserverTimer(INTERSERVER_TIMER); // does MySQL pings and auto-reconnect
|
||||||
Timer UpdateWhoTimer(RuleI(Zone, UpdateWhoTimer) * 1000); // updates who list every 2 minutes
|
Timer UpdateWhoTimer(RuleI(Zone, UpdateWhoTimer) * 1000); // updates who list every 2 minutes
|
||||||
|
Timer WorldserverProcess(1000);
|
||||||
|
|
||||||
#ifdef EQPROFILE
|
#ifdef EQPROFILE
|
||||||
#ifdef PROFILE_DUMP_TIME
|
#ifdef PROFILE_DUMP_TIME
|
||||||
@ -617,6 +618,10 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (WorldserverProcess.Check()) {
|
||||||
|
worldserver.Process();
|
||||||
|
}
|
||||||
|
|
||||||
if (is_zone_loaded) {
|
if (is_zone_loaded) {
|
||||||
{
|
{
|
||||||
entity_list.GroupProcess();
|
entity_list.GroupProcess();
|
||||||
|
|||||||
@ -81,7 +81,6 @@ WorldServer::WorldServer()
|
|||||||
cur_groupid = 0;
|
cur_groupid = 0;
|
||||||
last_groupid = 0;
|
last_groupid = 0;
|
||||||
oocmuted = false;
|
oocmuted = false;
|
||||||
m_process_timer = std::make_unique<EQ::Timer>(1000, true, std::bind(&WorldServer::Process, this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldServer::~WorldServer() {
|
WorldServer::~WorldServer() {
|
||||||
@ -95,6 +94,7 @@ void WorldServer::Process()
|
|||||||
if (it->second.reload_at_unix < std::time(nullptr)) {
|
if (it->second.reload_at_unix < std::time(nullptr)) {
|
||||||
ProcessReload(it->second);
|
ProcessReload(it->second);
|
||||||
it = m_reload_queue.erase(it);
|
it = m_reload_queue.erase(it);
|
||||||
|
break;
|
||||||
} else {
|
} else {
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,6 @@ private:
|
|||||||
ZoneEventScheduler *m_zone_scheduler;
|
ZoneEventScheduler *m_zone_scheduler;
|
||||||
|
|
||||||
// server reload queue
|
// server reload queue
|
||||||
std::unique_ptr<EQ::Timer> m_process_timer;
|
|
||||||
std::mutex m_reload_mutex = {};
|
std::mutex m_reload_mutex = {};
|
||||||
std::map<int, ServerReload::Request> m_reload_queue = {};
|
std::map<int, ServerReload::Request> m_reload_queue = {};
|
||||||
public:
|
public:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user