From 4b81ec02d75f4ce769248a580126a5f105b780ed Mon Sep 17 00:00:00 2001 From: diva Date: Tue, 16 Dec 2008 19:44:32 +0000 Subject: Avoid sending DisableSimulator event to the root agent upon logout. --- OpenSim/Region/Environment/Scenes/Scene.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index f6d82c4..5502f97 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -3130,16 +3130,19 @@ namespace OpenSim.Region.Environment.Scenes // m_sceneGraph.removeUserCount(true); // } - // Tell a single agent to disconnect from the region. - IEventQueue eq = RequestModuleInterface(); - if (eq != null) + // Don't do this to root agents on logout, it's not nice for the viewer + if (presence.IsChildAgent) { - OSD Item = EventQueueHelper.DisableSimulator(RegionInfo.RegionHandle); - eq.Enqueue(Item, agentID); + // Tell a single agent to disconnect from the region. + IEventQueue eq = RequestModuleInterface(); + if (eq != null) + { + OSD Item = EventQueueHelper.DisableSimulator(RegionInfo.RegionHandle); + eq.Enqueue(Item, agentID); + } + else + presence.ControllingClient.SendShutdownConnectionNotice(); } - else - presence.ControllingClient.SendShutdownConnectionNotice(); - presence.ControllingClient.Close(true); } -- cgit v1.1