Make Log thread-safe.

Since logging is exposed via static methods, it need to be thread-safe or multiple threads trying to log at the same time will cause bad things to happen.
This commit is contained in:
RoosterDragon
2016-01-04 19:27:48 +00:00
parent e9d76011c5
commit 081b40b14f
2 changed files with 41 additions and 34 deletions

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Network
{
try
{
NatUtility.Logger = Log.Channels["server"].Writer;
NatUtility.Logger = Log.Channel("server").Writer;
NatUtility.Verbose = Game.Settings.Server.VerboseNatDiscovery;
NatUtility.DeviceFound += DeviceFound;
Game.Settings.Server.NatDeviceAvailable = false;