From 2826f713d449404fa3908472bb49f4d6515ad048 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 30 Jul 2016 21:25:26 +0100 Subject: [PATCH] stop creating caches on all standalone regions on a single instance ( why are shared modules been created on every scene?? ) --- .../ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | 4 ++-- .../ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 58bd4ea1f4..47792a21ce 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]"; private IGridService m_GridService; - private RegionInfoCache m_RegionInfoCache = null; + static private RegionInfoCache m_RegionInfoCache = null; private bool m_Enabled; @@ -95,7 +95,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid private bool InitialiseService(IConfigSource source, RegionInfoCache ric) { - if(ric == null) + if(ric == null && m_RegionInfoCache == null) m_RegionInfoCache = new RegionInfoCache(); else m_RegionInfoCache = ric; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index 21f7567f58..077eb979ce 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs @@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid private IGridService m_LocalGridService; private IGridService m_RemoteGridService; - private RegionInfoCache m_RegionInfoCache = new RegionInfoCache(); + static private RegionInfoCache m_RegionInfoCache; public RemoteGridServicesConnector() { @@ -122,6 +122,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid return false; } + if(m_RegionInfoCache == null) + m_RegionInfoCache = new RegionInfoCache(); + return true; }