Changeset 189 for binary-improvements/7dtd-server-fixes/src/NetConnections/ConsoleOutputSeparator.cs
- Timestamp:
- Sep 12, 2014, 11:14:11 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/NetConnections/ConsoleOutputSeparator.cs
r132 r189 28 28 Log.Out ("Executed command \"" + _command + "\" from player \"" + _playerID + "\""); 29 29 30 object obj = netCommandQueue; 31 Monitor.Enter (obj); 32 try { 30 lock (netCommandQueue) { 33 31 isCurrentCommandFromClient = true; 34 32 console.issuerOfCurrentClientCommand = _networkPlayer; 35 33 console.ExecuteClientCmdInternal (_playerID, _command); 36 34 isCurrentCommandFromClient = false; 37 } finally {38 Monitor.Exit (obj);39 35 } 40 36 … … 61 57 { 62 58 if (netCommandQueue.Count > 0) { 63 object obj = netCommandQueue; 64 Monitor.Enter (obj); 65 try { 59 lock (netCommandQueue) { 66 60 issuerOfCurrentCommand = netCommandQueue [0].client; 67 console.ExecuteRemoteCmdInternal (netCommandQueue [0].command, false); 61 try { 62 console.ExecuteRemoteCmdInternal (netCommandQueue [0].command, false); 63 } catch (Exception e) { 64 Log.Out("Exception while executing command: " + e); 65 } 68 66 netCommandQueue.RemoveAt (0); 69 67 issuerOfCurrentCommand = null; 70 } finally {71 Monitor.Exit (obj);72 68 } 73 69 } … … 76 72 public static void QueueNetCommand (string _line, IConnection _con) 77 73 { 78 object obj = netCommandQueue; 79 Monitor.Enter (obj); 80 try { 74 lock (netCommandQueue) { 81 75 netCommandQueue.Add (new NetCommand (_line, _con)); 82 } finally {83 Monitor.Exit (obj);84 76 } 85 77 }
Note:
See TracChangeset
for help on using the changeset viewer.