Core/Warden: Fix warden timeout ticking twice as fast as it should

(cherry picked from commit ec783fcbb59fcd6e657bc1a39c2b073fd7506ed4)
This commit is contained in:
Shauren
2022-02-04 00:27:12 +01:00
parent 0257cdc8ca
commit f7ed56f232
+3 -3
View File
@@ -472,9 +472,6 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
_recvQueue.readd(requeuePackets.begin(), requeuePackets.end());
if (m_Socket[CONNECTION_TYPE_REALM] && m_Socket[CONNECTION_TYPE_REALM]->IsOpen() && _warden)
_warden->Update(diff);
if (!updater.ProcessUnsafe()) // <=> updater is of type MapSessionFilter
{
// Send time sync packet every 10s.
@@ -493,6 +490,9 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
//logout procedure should happen only in World::UpdateSessions() method!!!
if (updater.ProcessUnsafe())
{
if (m_Socket[CONNECTION_TYPE_REALM] && m_Socket[CONNECTION_TYPE_REALM]->IsOpen() && _warden)
_warden->Update(diff);
///- If necessary, log the player out
if (ShouldLogOut(currentTime) && m_playerLoading.IsEmpty())
LogoutPlayer(true);