add game log server

This commit is contained in:
RaidMax
2018-09-06 13:25:58 -05:00
parent 0c90d02e44
commit 385879618d
23 changed files with 362 additions and 71 deletions

View File

@ -47,13 +47,28 @@ namespace WebfrontCore.Controllers
};
Manager.GetEventHandler().AddEvent(remoteEvent);
List<CommandResponseInfo> response;
// wait for the event to process
await remoteEvent.OnProcessed.WaitAsync(60*1000);
var response = server.CommandResult.Where(c => c.ClientId == client.ClientId).ToList();
if (await remoteEvent.WaitAsync(60 * 1000))
{
response = server.CommandResult.Where(c => c.ClientId == client.ClientId).ToList();
// remove the added command response
for (int i = 0; i < response.Count; i++)
server.CommandResult.Remove(response[i]);
// remove the added command response
for (int i = 0; i < response.Count; i++)
server.CommandResult.Remove(response[i]);
}
else
{
response = new List<CommandResponseInfo>()
{
new CommandResponseInfo()
{
ClientId = client.ClientId,
Response = Utilities.CurrentLocalization.LocalizationIndex["SERVER_ERROR_COMMAND_TIMEOUT"]
}
};
}
return View("_Response", response);
}