Put back the code to create the ready marker file.

0.9.1.0-post-fixes
Melanie 2019-07-29 18:05:30 +01:00
parent 34209d2a39
commit 1c8508cfbd
1 changed files with 23 additions and 0 deletions

View File

@ -1776,6 +1776,29 @@ namespace OpenSim.Region.Framework.Scenes
// Region ready should always be set
Ready = true;
IConfig restartConfig = m_config.Configs["RestartModule"];
if (restartConfig != null)
{
string markerPath = restartConfig.GetString("MarkerPath", String.Empty);
if (markerPath != String.Empty)
{
string path = Path.Combine(markerPath, RegionInfo.RegionID.ToString() + ".ready");
try
{
string pidstring = System.Diagnostics.Process.GetCurrentProcess().Id.ToString();
FileStream fs = File.Create(path);
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
Byte[] buf = enc.GetBytes(pidstring);
fs.Write(buf, 0, buf.Length);
fs.Close();
}
catch (Exception)
{
}
}
}
}
else
{