diff options
author | Adam Frisby | 2008-11-08 20:52:48 +0000 |
---|---|---|
committer | Adam Frisby | 2008-11-08 20:52:48 +0000 |
commit | fb2a1a6b7cc65352644921bc7c7b7745ca7d2560 (patch) | |
tree | 40de926d545c113c8bb8af2c992b15506277c4d8 /OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |
parent | * "Fixed" a NRE with the new script engine Tedd committed (diff) | |
download | opensim-SC-fb2a1a6b7cc65352644921bc7c7b7745ca7d2560.zip opensim-SC-fb2a1a6b7cc65352644921bc7c7b7745ca7d2560.tar.gz opensim-SC-fb2a1a6b7cc65352644921bc7c7b7745ca7d2560.tar.bz2 opensim-SC-fb2a1a6b7cc65352644921bc7c7b7745ca7d2560.tar.xz |
* Fixed a major memory leak in packet processing - PacketQueue.Close is never called, causing the PacketQueue for dead clients to be preserved (including it's contents).
* This patch is highly experimental and may cause clients to not be able to connect, if this is the case, it will be rolled back in approximately 5 minutes.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 9aa27ec..bb2d270 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -131,7 +131,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
131 | userSettings.ClientThrottleMultipler); | 131 | userSettings.ClientThrottleMultipler); |
132 | 132 | ||
133 | throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); | 133 | throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); |
134 | throttleTimer.Elapsed += new ElapsedEventHandler(ThrottleTimerElapsed); | 134 | throttleTimer.Elapsed += ThrottleTimerElapsed; |
135 | throttleTimer.Start(); | 135 | throttleTimer.Start(); |
136 | 136 | ||
137 | // TIMERS needed for this | 137 | // TIMERS needed for this |
@@ -256,9 +256,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
256 | } | 256 | } |
257 | } | 257 | } |
258 | 258 | ||
259 | public void WipeClean() | ||
260 | { | ||
261 | m_log.Info("[PACKETQUEUE] Wiping Packet Queues Clean"); | ||
262 | lock(this) | ||
263 | { | ||
264 | ResendOutgoingPacketQueue.Clear(); | ||
265 | LandOutgoingPacketQueue.Clear(); | ||
266 | WindOutgoingPacketQueue.Clear(); | ||
267 | CloudOutgoingPacketQueue.Clear(); | ||
268 | TaskOutgoingPacketQueue.Clear(); | ||
269 | TaskLowpriorityPacketQueue.Clear(); | ||
270 | TextureOutgoingPacketQueue.Clear(); | ||
271 | AssetOutgoingPacketQueue.Clear(); | ||
272 | SendQueue.Clear(); | ||
273 | } | ||
274 | } | ||
275 | |||
259 | public void Close() | 276 | public void Close() |
260 | { | 277 | { |
278 | m_log.Info("[PACKETQUEUE] Close called"); | ||
261 | Flush(); | 279 | Flush(); |
280 | WipeClean(); // I'm sure there's a dirty joke in here somewhere. -AFrisby | ||
262 | 281 | ||
263 | m_enabled = false; | 282 | m_enabled = false; |
264 | throttleTimer.Stop(); | 283 | throttleTimer.Stop(); |