move datasnapshot notification to last, but still a issue with very fast service servers

httptests
UbitUmarov 2018-01-22 23:51:15 +00:00
parent a67b523acf
commit cf3d3f4f4a
1 changed files with 8 additions and 13 deletions

View File

@ -150,11 +150,8 @@ namespace OpenSim.Region.DataSnapshot
m_enabled = false; m_enabled = false;
return; return;
} }
} }
} }
} }
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
@ -208,24 +205,16 @@ namespace OpenSim.Region.DataSnapshot
if (!m_enabled) if (!m_enabled)
return; return;
if (m_snapStore == null)
if (!m_servicesNotified)
{ {
m_hostname = scene.RegionInfo.ExternalHostName; m_hostname = scene.RegionInfo.ExternalHostName;
m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname); m_snapStore = new SnapshotStore(m_snapsDir, m_gridinfo, m_listener_port, m_hostname);
//Hand it the first scene, assuming that all scenes have the same BaseHTTPServer //Hand it the first scene, assuming that all scenes have the same BaseHTTPServer
new DataRequestHandler(scene, this); new DataRequestHandler(scene, this);
if (m_dataServices != "" && m_dataServices != "noservices")
NotifyDataServices(m_dataServices, "online");
m_servicesNotified = true;
} }
m_snapStore.AddScene(scene); m_snapStore.AddScene(scene);
m_log.DebugFormat("[DATASNAPSHOT]: Marking scene {0} as stale.", scene.RegionInfo.RegionName);
m_snapStore.ForceSceneStale(scene);
Assembly currentasm = Assembly.GetExecutingAssembly(); Assembly currentasm = Assembly.GetExecutingAssembly();
@ -250,6 +239,13 @@ namespace OpenSim.Region.DataSnapshot
} }
} }
if (!m_servicesNotified)
{
if (m_dataServices != "" && m_dataServices != "noservices")
NotifyDataServices(m_dataServices, "online");
m_servicesNotified = true;
}
} }
public void Close() public void Close()
@ -261,7 +257,6 @@ namespace OpenSim.Region.DataSnapshot
NotifyDataServices(m_dataServices, "offline"); NotifyDataServices(m_dataServices, "offline");
} }
public string Name public string Name
{ {
get { return "External Data Generator"; } get { return "External Data Generator"; }