Add a delay to let regions load before calling PostInit

Something is letting PostInit fire before the regions are loaded. This small delay "fixes" it. Will continue to look for a way to make sure they are loaded first.
integration
BlueWall 2012-04-03 14:50:26 -04:00
parent b3ecf935cd
commit 639c6bdd62
2 changed files with 8 additions and 2 deletions

View File

@ -135,7 +135,10 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
} }
} }
} }
// Temporary fix for an issue after the mono-addis upgrade
// PostInilise can fire before the region is loaded, so need to
// track down the cause of that
Thread.Sleep(300);
m_openSim.ModuleLoader.PostInitialise(); m_openSim.ModuleLoader.PostInitialise();
m_openSim.ModuleLoader.ClearCache(); m_openSim.ModuleLoader.ClearCache();
} }

View File

@ -69,8 +69,10 @@ namespace OpenSim.Services.IntegrationService
if (serverConfig == null) if (serverConfig == null)
throw new Exception(String.Format("No section {0} in config file", m_ConfigName)); throw new Exception(String.Format("No section {0} in config file", m_ConfigName));
// defaults to the ./bin directory
string RegistryLocation = serverConfig.GetString("PluginRegistryLocation", string RegistryLocation = serverConfig.GetString("PluginRegistryLocation",
"."); ".");
AddinManager.AddinLoaded += on_addinloaded_; AddinManager.AddinLoaded += on_addinloaded_;
AddinManager.AddinLoadError += on_addinloaderror_; AddinManager.AddinLoadError += on_addinloaderror_;
@ -98,7 +100,8 @@ namespace OpenSim.Services.IntegrationService
string gridService = m_IntegrationServerConfig.GetString("GridService", String.Empty); string gridService = m_IntegrationServerConfig.GetString("GridService", String.Empty);
string presenceService = m_IntegrationServerConfig.GetString("PresenceService", String.Empty); string presenceService = m_IntegrationServerConfig.GetString("PresenceService", String.Empty);
// These are here now, but will be gone soon.
// Each plugin will load it's own services
Object[] args = new Object[] { config }; Object[] args = new Object[] { config };
if (gridService != string.Empty) if (gridService != string.Empty)
m_GridService = LoadPlugin<IGridService>(gridService, args); m_GridService = LoadPlugin<IGridService>(gridService, args);