mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[World] Fix Rarer Reload Deadlock (#4893)
This commit is contained in:
@@ -132,6 +132,16 @@ void ZSList::Process() {
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
if (!m_queued_reloads.empty()) {
|
||||
m_queued_reloads_mutex.lock();
|
||||
for (auto &type : m_queued_reloads) {
|
||||
LogInfo("Sending reload of type [{}] to zones", ServerReload::GetName(type));
|
||||
SendServerReload(type, nullptr);
|
||||
}
|
||||
m_queued_reloads.clear();
|
||||
m_queued_reloads_mutex.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
bool ZSList::SendPacket(ServerPacket* pack) {
|
||||
@@ -1003,3 +1013,10 @@ void ZSList::SendServerReload(ServerReload::Type type, uchar *packet)
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
||||
void ZSList::QueueServerReload(ServerReload::Type &type)
|
||||
{
|
||||
m_queued_reloads_mutex.lock();
|
||||
m_queued_reloads.emplace_back(type);
|
||||
m_queued_reloads_mutex.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user