diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs
index faf746fac0..d1a7217e4a 100644
--- a/OpenSim/Region/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs
@@ -57,7 +57,12 @@ namespace OpenSim.Region.UserStatistics
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static SqliteConnection dbConn;
+
+ ///
+ /// User statistics sessions keyed by agent ID
+ ///
private Dictionary m_sessions = new Dictionary();
+
private List m_scenes = new List();
private Dictionary reports = new Dictionary();
private Dictionary m_simstatsCounters = new Dictionary();
@@ -308,7 +313,6 @@ namespace OpenSim.Region.UserStatistics
scene.EventManager.OnDeregisterCaps += OnDeRegisterCaps;
scene.EventManager.OnClientClosed += OnClientClosed;
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
- scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
}
}
}
@@ -342,15 +346,11 @@ namespace OpenSim.Region.UserStatistics
}
}
- private void OnMakeChildAgent(ScenePresence agent)
- {
- }
-
private void OnClientClosed(UUID agentID, Scene scene)
{
lock (m_sessions)
{
- if (m_sessions.ContainsKey(agentID))
+ if (m_sessions.ContainsKey(agentID) && m_sessions[agentID].region_id == scene.RegionInfo.RegionID)
{
m_sessions.Remove(agentID);
}