stop creating caches on all standalone regions on a single instance ( why are shared modules been created on every scene?? )

LSLKeyTest
UbitUmarov 2016-07-30 21:25:26 +01:00
parent 9a4afa753b
commit 2826f713d4
2 changed files with 6 additions and 3 deletions

View File

@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]"; private static string LogHeader = "[LOCAL GRID SERVICE CONNECTOR]";
private IGridService m_GridService; private IGridService m_GridService;
private RegionInfoCache m_RegionInfoCache = null; static private RegionInfoCache m_RegionInfoCache = null;
private bool m_Enabled; private bool m_Enabled;
@ -95,7 +95,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
private bool InitialiseService(IConfigSource source, RegionInfoCache ric) private bool InitialiseService(IConfigSource source, RegionInfoCache ric)
{ {
if(ric == null) if(ric == null && m_RegionInfoCache == null)
m_RegionInfoCache = new RegionInfoCache(); m_RegionInfoCache = new RegionInfoCache();
else else
m_RegionInfoCache = ric; m_RegionInfoCache = ric;

View File

@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
private IGridService m_LocalGridService; private IGridService m_LocalGridService;
private IGridService m_RemoteGridService; private IGridService m_RemoteGridService;
private RegionInfoCache m_RegionInfoCache = new RegionInfoCache(); static private RegionInfoCache m_RegionInfoCache;
public RemoteGridServicesConnector() public RemoteGridServicesConnector()
{ {
@ -122,6 +122,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
return false; return false;
} }
if(m_RegionInfoCache == null)
m_RegionInfoCache = new RegionInfoCache();
return true; return true;
} }