aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
index 71f6fe1..2a3d14f 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs
@@ -108,15 +108,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
108 { 108 {
109 if (!pool.ContainsKey(type) || pool[type] == null || (pool[type]).Count == 0) 109 if (!pool.ContainsKey(type) || pool[type] == null || (pool[type]).Count == 0)
110 { 110 {
111// m_log.DebugFormat("[PACKETPOOL]: Building {0} packet", type);
112
111 // Creating a new packet if we cannot reuse an old package 113 // Creating a new packet if we cannot reuse an old package
112 packet = Packet.BuildPacket(type); 114 packet = Packet.BuildPacket(type);
113 } 115 }
114 else 116 else
115 { 117 {
118// m_log.DebugFormat("[PACKETPOOL]: Pulling {0} packet", type);
119
116 // Recycle old packages 120 // Recycle old packages
117 m_packetsReusedStat.Antecedent++; 121 m_packetsReusedStat.Antecedent++;
118 122
119 packet = (pool[type]).Pop(); 123 packet = pool[type].Pop();
120 } 124 }
121 } 125 }
122 126
@@ -227,7 +231,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
227 231
228 if ((pool[type]).Count < 50) 232 if ((pool[type]).Count < 50)
229 { 233 {
230 (pool[type]).Push(packet); 234// m_log.DebugFormat("[PACKETPOOL]: Pushing {0} packet", type);
235
236 pool[type].Push(packet);
231 } 237 }
232 } 238 }
233 break; 239 break;