aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-09-04 23:48:24 +0100
committerJustin Clark-Casey (justincc)2013-09-04 23:48:24 +0100
commitdc74a50225a901e969ea83008555170f5742ca7a (patch)
tree8140b7a95c0eaa4340c9fc91f03b1223be1a93c6 /OpenSim/Region
parentAlso check user authorization if looking to upgrade from a child to a root ag... (diff)
downloadopensim-SC_OLD-dc74a50225a901e969ea83008555170f5742ca7a.zip
opensim-SC_OLD-dc74a50225a901e969ea83008555170f5742ca7a.tar.gz
opensim-SC_OLD-dc74a50225a901e969ea83008555170f5742ca7a.tar.bz2
opensim-SC_OLD-dc74a50225a901e969ea83008555170f5742ca7a.tar.xz
Stop "show client stats" from throwing an exception if somehow Scene.m_clientManager still retains a reference to a dead client.
Instead, "show client stats" now prints "Off!" so that exception is not thrown and we know which entries in ClientManager are in this state. There's a race condition which could trigger this, but the window is extremely short and exceptions would not be thrown consistently (which is the behaviour observed). It should otherwise be impossible for this condition to occur, so there may be a weakness in client manager IClientAPI removal.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index 15dea17..1eb0a6b 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -624,9 +624,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden
624 int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); 624 int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum();
625 avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); 625 avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1);
626 626
627 string childAgentStatus;
628
629 if (llClient.SceneAgent != null)
630 childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y";
631 else
632 childAgentStatus = "Off!";
633
627 m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", 634 m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}",
628 scene.RegionInfo.RegionName, llClient.Name, 635 scene.RegionInfo.RegionName, llClient.Name,
629 llClient.SceneAgent.IsChildAgent ? "N" : "Y", 636 childAgentStatus,
630 (DateTime.Now - cinfo.StartedTime).Minutes, 637 (DateTime.Now - cinfo.StartedTime).Minutes,
631 avg_reqs, 638 avg_reqs,
632 string.Format( 639 string.Format(