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

[misc bug fixes]

properly hide broadcast failure messages if ignore connection lost is turned on
fix concurent issue for update stats history that happened with new event processing
make get/set additional property thread safe
add ellipse to truncated chat messages on home
This commit is contained in:
RaidMax
2020-04-25 19:01:26 -05:00
parent d5c45717a6
commit 1f7f40f296
26 changed files with 258 additions and 74 deletions

View File

@ -216,8 +216,11 @@ namespace IW4MAdmin
if (lastException != null)
{
Logger.WriteDebug("Last Exception is not null");
throw lastException;
bool notifyDisconnects = !Manager.GetApplicationSettings().Configuration().IgnoreServerConnectionLost;
if (notifyDisconnects || (!notifyDisconnects && lastException as NetworkException == null))
{
throw lastException;
}
}
}
}
@ -250,7 +253,7 @@ namespace IW4MAdmin
if (E.Type == GameEvent.EventType.ConnectionRestored)
{
if (Throttled)
if (Throttled && !Manager.GetApplicationSettings().Configuration().IgnoreServerConnectionLost)
{
Logger.WriteVerbose(loc["MANAGER_CONNECTION_REST"].FormatExt($"[{IP}:{Port}]"));
}
@ -292,6 +295,12 @@ namespace IW4MAdmin
return false;
}
if (E.Origin.CurrentServer == null)
{
Logger.WriteWarning($"preconnecting client {E.Origin} did not have a current server specified");
E.Origin.CurrentServer = this;
}
var existingClient = GetClientsAsList().FirstOrDefault(_client => _client.Equals(E.Origin));
// they're already connected
@ -800,7 +809,7 @@ namespace IW4MAdmin
Manager.GetEventHandler().AddEvent(e);
}
if (ConnectionErrors > 0 && notifyDisconnects)
if (ConnectionErrors > 0)
{
var _event = new GameEvent()
{
@ -820,7 +829,7 @@ namespace IW4MAdmin
catch (NetworkException e)
{
ConnectionErrors++;
if (ConnectionErrors == 3 && notifyDisconnects)
if (ConnectionErrors == 3)
{
var _event = new GameEvent()
{