mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-21 07:11:59 -04:00
Properly deregister WorldSocket connections in case of reaching socket timeout time.
--HG-- branch : trunk
This commit is contained in:
@@ -49,7 +49,7 @@ LookingForGroup_auto_join(false), LookingForGroup_auto_add(false), m_muteTime(mu
|
||||
_player(NULL), m_Socket(sock),_security(sec), _accountId(id), m_expansion(expansion),
|
||||
m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(objmgr.GetIndexForLocale(locale)),
|
||||
_logoutTime(0), m_inQueue(false), m_playerLoading(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_playerSave(false),
|
||||
m_latency(0), m_TutorialsChanged(false)
|
||||
m_latency(0), m_TutorialsChanged(false), m_timeOutTime(0)
|
||||
{
|
||||
if (sock)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ bool WorldSession::Update(uint32 /*diff*/)
|
||||
LookupOpcodeName(packet->GetOpcode()),
|
||||
packet->GetOpcode());
|
||||
#endif*/
|
||||
|
||||
|
||||
if (packet->GetOpcode() >= NUM_MSG_TYPES)
|
||||
{
|
||||
sLog.outError("SESSION: received non-existed opcode %s (0x%.4X)",
|
||||
@@ -287,6 +287,10 @@ bool WorldSession::Update(uint32 /*diff*/)
|
||||
if (!m_Socket || (ShouldLogOut(currTime) && !m_playerLoading))
|
||||
LogoutPlayer(true);
|
||||
|
||||
///- If necessary, kick the player from the character select screen
|
||||
if (IsConnectionIdle())
|
||||
return false;
|
||||
|
||||
if (!m_Socket)
|
||||
return false; //Will remove this session from the world session map
|
||||
|
||||
|
||||
Reference in New Issue
Block a user