mirror of
git://opensimulator.org/git/opensim
synced 2026-08-14 00:58:07 +00:00
Fix bug where gathering the clientstack..OutgoingPacketsQueuedCount stat would fail with a casting exception for scenes with NPCs
Present since 51eb8fa (Oct 2 2014)
This commit is contained in:
@@ -770,8 +770,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
foreach (ScenePresence sp in Scene.GetScenePresences())
|
||||
{
|
||||
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
||||
total += udpClient.GetTotalPacketsQueuedCount();
|
||||
// XXX: Need a better way to determine which IClientAPIs have UDPClients (NPCs do not, for instance).
|
||||
if (sp.ControllingClient is LLClientView)
|
||||
{
|
||||
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
|
||||
total += udpClient.GetTotalPacketsQueuedCount();
|
||||
}
|
||||
}
|
||||
|
||||
return total;
|
||||
|
||||
Reference in New Issue
Block a user