From ca3b229e941512b3d05793f9fbbede7702eeeb38 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 28 May 2012 09:15:24 +0200 Subject: [PATCH] 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, --- .../RemoteController/RemoteAdminPlugin.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 49a8e64c28..9e72a98a76 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -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;