1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Do not process pack if it was blocked by a queryReply

Regression from earlier PR
This commit is contained in:
Ivan Savenko
2024-09-19 16:45:13 +00:00
parent bbeaf0ad01
commit 292f4c8ad2

View File

@@ -456,26 +456,28 @@ void CGameHandler::handleReceivedPack(CPackForServer * pack)
{
sendPackageResponse(false);
}
bool result;
try
{
ApplyGhNetPackVisitor applier(*this);
pack->visit(applier);
result = applier.getResult();
}
catch(ExceptionNotAllowedAction &)
{
result = false;
}
if(result)
logGlobal->trace("Message %s successfully applied!", typeid(*pack).name());
else
complain((boost::format("Got false in applying %s... that request must have been fishy!")
% typeid(*pack).name()).str());
{
bool result;
try
{
ApplyGhNetPackVisitor applier(*this);
pack->visit(applier);
result = applier.getResult();
}
catch(ExceptionNotAllowedAction &)
{
result = false;
}
sendPackageResponse(true);
if(result)
logGlobal->trace("Message %s successfully applied!", typeid(*pack).name());
else
complain((boost::format("Got false in applying %s... that request must have been fishy!")
% typeid(*pack).name()).str());
sendPackageResponse(true);
}
vstd::clear_pointer(pack);
}