If a region is not found on a simulator, make the health query return

0 to indicate it's still starting rather than an error. There are other
methods that can discover the presence of a region and slow starting regions
may cause the watchdog to kill them while they start,
avinationmerge
Melanie 2012-05-28 09:15:24 +02:00
parent c5e73c0cb8
commit ca3b229e94
1 changed files with 13 additions and 4 deletions

View File

@ -1673,16 +1673,25 @@ namespace OpenSim.ApplicationPlugins.RemoteController
Hashtable responseData = (Hashtable)response.Value;
Hashtable requestData = (Hashtable)request.Params[0];
int flags = 0;
string text = String.Empty;
int health = 0;
responseData["success"] = true;
CheckRegionParams(requestData, responseData);
Scene scene = null;
GetSceneFromRegionParams(requestData, responseData, out scene);
try
{
GetSceneFromRegionParams(requestData, responseData, out scene);
health = scene.GetHealth(out flags, out text);
}
catch (Exception e)
{
responseData["error"] = null;
}
int flags;
string text;
int health = scene.GetHealth(out flags, out text);
responseData["success"] = true;
responseData["health"] = health;
responseData["flags"] = flags;
responseData["message"] = text;