From ae30d74b79d7e972626a3d92c0669f5855f8e59f Mon Sep 17 00:00:00 2001 From: diva Date: Mon, 22 Dec 2008 05:59:29 +0000 Subject: On closing EQs, make sure to wait for the viewer to fetch the last events. --- OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs index c5930a0..1a315bc 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Net; using System.Net.Sockets; using System.Reflection; +using System.Threading; using System.Xml; using OpenMetaverse; using OpenMetaverse.StructuredData; @@ -207,6 +208,9 @@ namespace OpenSim.Region.Environment.Modules.Framework private void ClientClosed(UUID AgentID) { m_log.DebugFormat("[EVENTQUEUE]: Closed client {0} in region {1}", AgentID, m_scene.RegionInfo.RegionName); + while (queues[AgentID].Count() > 0) + Thread.Sleep(1000); + lock (queues) { queues.Remove(AgentID); -- cgit v1.1