From 27efecc82fda0214b9b68aa6672dc71ceef1fc99 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 24 Oct 2014 21:51:27 +0100 Subject: [PATCH] minor: In "show client stats" command, properly handle the case where a client has made no AgentUpdate requests (as is the case with agents that have only even been child) rather than throwing an exception --- .../OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index cc6a1e8681..f6772a5f8a 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -603,7 +603,9 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden string.Format( "{0} ({1:0.00}%)", llClient.TotalAgentUpdates, - (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100)); + cinfo.SyncRequests.ContainsKey("AgentUpdate") + ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 + : 0)); } }); }