diff --git a/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs b/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs index 2c74c0e0c0..8429f5947f 100644 --- a/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs +++ b/OpenSim/Region/CoreModules/Framework/ServiceThrottle/ServiceThrottleModule.cs @@ -116,24 +116,25 @@ namespace OpenSim.Region.CoreModules.Framework //m_log.DebugFormat("[SERVICE THROTTLE]: RegionHandleRequest {0}", regionID); Action action = delegate { - if(!client.IsActive) - return; - - if(m_scenes.Count == 0) + if(!client.IsActive || m_scenes.Count == 0 || m_scenes[0] == null ) + { + client = null; return; + } Scene baseScene = m_scenes[0]; - - if(baseScene == null || baseScene.ShuttingDown) + if(baseScene.ShuttingDown) + { + client = null; return; + } GridRegion r = baseScene.GridService.GetRegionByUUID(UUID.Zero, regionID); - if(!client.IsActive) - return; - - if (r != null && r.RegionHandle != 0) + if (client.IsActive && r != null && r.RegionHandle != 0) client.SendRegionHandle(regionID, r.RegionHandle); + + client = null; }; m_processorJobEngine.QueueJob("regionHandle", action, regionID.ToString());