mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
Add logging for when account or match server disconnects
This commit is contained in:
@@ -293,6 +293,7 @@ void LobbyServer::onDisconnected(const NetworkConnectionPtr & connection, const
|
|||||||
{
|
{
|
||||||
if(activeAccounts.count(connection))
|
if(activeAccounts.count(connection))
|
||||||
{
|
{
|
||||||
|
logGlobal->info("Account %s disconnecting. Accounts online: %d", activeAccounts.at(connection), activeAccounts.size() - 1);
|
||||||
database->setAccountOnline(activeAccounts.at(connection), false);
|
database->setAccountOnline(activeAccounts.at(connection), false);
|
||||||
activeAccounts.erase(connection);
|
activeAccounts.erase(connection);
|
||||||
}
|
}
|
||||||
@@ -300,6 +301,7 @@ void LobbyServer::onDisconnected(const NetworkConnectionPtr & connection, const
|
|||||||
if(activeGameRooms.count(connection))
|
if(activeGameRooms.count(connection))
|
||||||
{
|
{
|
||||||
std::string gameRoomID = activeGameRooms.at(connection);
|
std::string gameRoomID = activeGameRooms.at(connection);
|
||||||
|
logGlobal->info("Game room %s disconnecting. Rooms online: %d", gameRoomID, activeGameRooms.size() - 1);
|
||||||
|
|
||||||
if (database->getGameRoomStatus(gameRoomID) == LobbyRoomState::BUSY)
|
if (database->getGameRoomStatus(gameRoomID) == LobbyRoomState::BUSY)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user