mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Reverted debug changes
This commit is contained in:
parent
4a5c1556a1
commit
6493922f9b
@ -408,54 +408,54 @@ void CVCMIServer::threadHandleClient(std::shared_ptr<CConnection> c)
|
|||||||
setThreadName("CVCMIServer::handleConnection");
|
setThreadName("CVCMIServer::handleConnection");
|
||||||
c->enterLobbyConnectionMode();
|
c->enterLobbyConnectionMode();
|
||||||
|
|
||||||
//#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
// try
|
try
|
||||||
// {
|
{
|
||||||
//#endif
|
#endif
|
||||||
while(c->connected)
|
while(c->connected)
|
||||||
{
|
{
|
||||||
CPack * pack;
|
CPack * pack;
|
||||||
|
|
||||||
//try
|
try
|
||||||
//{
|
{
|
||||||
pack = c->retrievePack();
|
pack = c->retrievePack();
|
||||||
//}
|
}
|
||||||
//catch(boost::system::system_error & e)
|
catch(boost::system::system_error & e)
|
||||||
//{
|
{
|
||||||
// logNetwork->error("Network error receiving a pack. Connection %s dies. What happened: %s", c->toString(), e.what());
|
logNetwork->error("Network error receiving a pack. Connection %s dies. What happened: %s", c->toString(), e.what());
|
||||||
// hangingConnections.insert(c);
|
hangingConnections.insert(c);
|
||||||
// connections.erase(c);
|
connections.erase(c);
|
||||||
// if(connections.empty() || hostClient == c)
|
if(connections.empty() || hostClient == c)
|
||||||
// state = EServerState::SHUTDOWN;
|
state = EServerState::SHUTDOWN;
|
||||||
//
|
|
||||||
// if(gh && state == EServerState::GAMEPLAY)
|
if(gh && state == EServerState::GAMEPLAY)
|
||||||
// {
|
{
|
||||||
// gh->handleClientDisconnection(c);
|
gh->handleClientDisconnection(c);
|
||||||
// }
|
}
|
||||||
// break;
|
break;
|
||||||
//}
|
}
|
||||||
|
|
||||||
CVCMIServerPackVisitor visitor(*this, this->gh);
|
CVCMIServerPackVisitor visitor(*this, this->gh);
|
||||||
pack->visit(visitor);
|
pack->visit(visitor);
|
||||||
}
|
}
|
||||||
//#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
// }
|
}
|
||||||
// catch(const std::exception & e)
|
catch(const std::exception & e)
|
||||||
// {
|
{
|
||||||
// (void)e;
|
(void)e;
|
||||||
// boost::unique_lock<boost::recursive_mutex> queueLock(mx);
|
boost::unique_lock<boost::recursive_mutex> queueLock(mx);
|
||||||
// logNetwork->error("%s dies... \nWhat happened: %s", c->toString(), e.what());
|
logNetwork->error("%s dies... \nWhat happened: %s", c->toString(), e.what());
|
||||||
// }
|
}
|
||||||
// catch(...)
|
catch(...)
|
||||||
// {
|
{
|
||||||
// state = EServerState::SHUTDOWN;
|
state = EServerState::SHUTDOWN;
|
||||||
// handleException();
|
handleException();
|
||||||
// throw;
|
throw;
|
||||||
// }
|
}
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
boost::unique_lock<boost::recursive_mutex> queueLock(mx);
|
boost::unique_lock<boost::recursive_mutex> queueLock(mx);
|
||||||
// if(state != ENDING_AND_STARTING_GAME)
|
|
||||||
if(c->connected)
|
if(c->connected)
|
||||||
{
|
{
|
||||||
auto lcd = std::make_unique<LobbyClientDisconnected>();
|
auto lcd = std::make_unique<LobbyClientDisconnected>();
|
||||||
|
Loading…
Reference in New Issue
Block a user