More server-side EntityEvent error logging, Item.ServerWrite does some error checks and writes NetEntityEvent.Type.Invalid as the type of the event instead of attempting to write a potentially unreadable message.

This commit is contained in:
Joonas Rikkonen
2018-07-29 22:28:56 +03:00
parent b7b033dac1
commit 458c972580
4 changed files with 60 additions and 4 deletions
@@ -504,7 +504,10 @@ namespace Barotrauma.Networking
}
catch (Exception e)
{
DebugConsole.ThrowError("Failed to write a network message for the client \""+c.Name+"\"!", e);
DebugConsole.ThrowError("Failed to write a network message for the client \"" + c.Name + "\"!", e);
GameAnalyticsManager.AddErrorEventOnce("GameServer.Update:ClientWriteFailed" + e.StackTrace, GameAnalyticsSDK.Net.EGAErrorSeverity.Error,
"Failed to write a network message for the client \"" + c.Name + "\"! (MidRoundSyncing: " + c.NeedsMidRoundSync + ")\n"
+ e.Message + "\n" + e.StackTrace);
}
}