diff options
author | Adam Frisby | 2008-10-12 01:12:07 +0000 |
---|---|---|
committer | Adam Frisby | 2008-10-12 01:12:07 +0000 |
commit | 765fc6c2895ea1f2e450d7d80739cc5840821786 (patch) | |
tree | 6af2a55f4512355fd9192e01ff9475ef2c0663f7 /OpenSim/Framework/PacketPool.cs | |
parent | * Small fix for when PacketPool is disabled to prevent it from crashing immed... (diff) | |
download | opensim-SC_OLD-765fc6c2895ea1f2e450d7d80739cc5840821786.zip opensim-SC_OLD-765fc6c2895ea1f2e450d7d80739cc5840821786.tar.gz opensim-SC_OLD-765fc6c2895ea1f2e450d7d80739cc5840821786.tar.bz2 opensim-SC_OLD-765fc6c2895ea1f2e450d7d80739cc5840821786.tar.xz |
* Removed a lock in a high performance section of OpenSim, in cases when it is not necessary.
Diffstat (limited to 'OpenSim/Framework/PacketPool.cs')
-rw-r--r-- | OpenSim/Framework/PacketPool.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs index fc4a53b..9e1d56d 100644 --- a/OpenSim/Framework/PacketPool.cs +++ b/OpenSim/Framework/PacketPool.cs | |||
@@ -53,6 +53,9 @@ namespace OpenSim.Framework | |||
53 | { | 53 | { |
54 | Packet packet; | 54 | Packet packet; |
55 | 55 | ||
56 | if (!packetPoolEnabled) | ||
57 | return Packet.BuildPacket(type); | ||
58 | |||
56 | lock (pool) | 59 | lock (pool) |
57 | { | 60 | { |
58 | if (!pool.ContainsKey(type) || pool[type] == null || (pool[type]).Count == 0) | 61 | if (!pool.ContainsKey(type) || pool[type] == null || (pool[type]).Count == 0) |