From e1904680e7891f34c4c1bec82c6fa4ba8cfc7b28 Mon Sep 17 00:00:00 2001 From: lotodore Date: Wed, 31 Mar 2010 13:34:35 +0000 Subject: [PATCH] Fixing login race condition. --- src/net/common/sessionmanager.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/net/common/sessionmanager.cpp b/src/net/common/sessionmanager.cpp index d3f15809..29a272be 100644 --- a/src/net/common/sessionmanager.cpp +++ b/src/net/common/sessionmanager.cpp @@ -135,9 +135,7 @@ SessionManager::GetSessionByUniquePlayerId(unsigned uniqueId, bool initSessions) if (initSessions || session_i->second.sessionData->GetState() != SessionData::Init) { boost::shared_ptr tmpPlayer(session_i->second.playerData); - if (!tmpPlayer.get()) - throw ServerException(__FILE__, __LINE__, ERR_NET_INVALID_SESSION, 0); - if (tmpPlayer->GetUniqueId() == uniqueId) + if (tmpPlayer && tmpPlayer->GetUniqueId() == uniqueId) { tmpSession = session_i->second; break;