1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

increase master history to 7 day, up from 1 day

This commit is contained in:
RaidMax
2019-07-21 17:14:44 -05:00
parent 486973a2bc
commit 21cda0123b
5 changed files with 28 additions and 25 deletions

View File

@ -51,12 +51,13 @@ namespace WebfrontCore.Controllers
};
Manager.GetEventHandler().AddEvent(remoteEvent);
List<CommandResponseInfo> response;
List<CommandResponseInfo> response = null;
try
{
var completedEvent = await remoteEvent.WaitAsync(Utilities.DefaultCommandTimeout, server.Manager.CancellationToken);
// wait for the event to process
if (!(await remoteEvent.WaitAsync(Utilities.DefaultCommandTimeout, server.Manager.CancellationToken)).Failed)
if (!completedEvent.Failed)
{
response = server.CommandResult.Where(c => c.ClientId == client.ClientId).ToList();
@ -67,16 +68,16 @@ namespace WebfrontCore.Controllers
}
}
else
else if (completedEvent.FailReason == GameEvent.EventFailReason.Timeout)
{
response = new List<CommandResponseInfo>()
{
new CommandResponseInfo()
{
ClientId = client.ClientId,
Response = Utilities.CurrentLocalization.LocalizationIndex["SERVER_ERROR_COMMAND_TIMEOUT"]
}
};
new CommandResponseInfo()
{
ClientId = client.ClientId,
Response = Utilities.CurrentLocalization.LocalizationIndex["SERVER_ERROR_COMMAND_TIMEOUT"]
}
};
}
}