diff --git a/src/net/common/netpacket.cpp b/src/net/common/netpacket.cpp index b7a517c6..4a253f68 100644 --- a/src/net/common/netpacket.cpp +++ b/src/net/common/netpacket.cpp @@ -21,6 +21,8 @@ #include #include +#include + #include using namespace std; @@ -3140,7 +3142,12 @@ NetPacketGameStart::SetData(const NetPacketGameStart::Data &inData) // Basic checking. if (numPlayers < MIN_NUMBER_OF_PLAYERS || numPlayers > MAX_NUMBER_OF_PLAYERS || numPlayers != inData.startData.numberOfPlayers) + { + // This seems to occur too often. + // TODO needs fix. + LOG_VERBOSE("Invalid number of players. Slots: " << numPlayers << ", Players: " << inData.startData.numberOfPlayers << "."); throw NetException(__FILE__, __LINE__, ERR_NET_INVALID_PLAYER_COUNT, 0); + } // Resize the packet so that the data fits in. Resize((u_int16_t) diff --git a/src/net/common/servergamethread.cpp b/src/net/common/servergamethread.cpp index 76bc098a..b538156d 100644 --- a/src/net/common/servergamethread.cpp +++ b/src/net/common/servergamethread.cpp @@ -101,6 +101,7 @@ ServerGameThread::RemoveAllSessions() { SessionWrapper tmpSession = m_sessionQueue.front(); m_sessionQueue.pop_front(); + LOG_VERBOSE("Game closing, forcing removal of session #" << tmpSession.sessionData->GetId() << "."); lobbyThread.RemoveSessionFromGame(tmpSession); } GetSessionManager().ForEach(boost::bind(&ServerLobbyThread::RemoveSessionFromGame, boost::ref(lobbyThread), _1));