diff options
author | Diva Canto | 2012-02-20 10:58:07 -0800 |
---|---|---|
committer | Diva Canto | 2012-02-20 11:00:01 -0800 |
commit | 512910a51f676499c2869726d4b5e06c8ba34728 (patch) | |
tree | dfa7cf21d18480863f1c2b9753de7911a285df2d /OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |
parent | Merge branch '0.7.3-post-fixes' of ssh://opensimulator.org/var/git/opensim in... (diff) | |
download | opensim-SC_OLD-512910a51f676499c2869726d4b5e06c8ba34728.zip opensim-SC_OLD-512910a51f676499c2869726d4b5e06c8ba34728.tar.gz opensim-SC_OLD-512910a51f676499c2869726d4b5e06c8ba34728.tar.bz2 opensim-SC_OLD-512910a51f676499c2869726d4b5e06c8ba34728.tar.xz |
More improvements on agent position updates: if the target sims fail, blacklist them for 2 min, so that we don't keep doing remote calls that fail.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index c04171b..19c9745 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -140,7 +140,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
140 | icon.EndInvoke(iar); | 140 | icon.EndInvoke(iar); |
141 | } | 141 | } |
142 | 142 | ||
143 | ExpiringCache<string, bool> _failedSims = new ExpiringCache<string, bool>(); | ||
144 | public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence) | 143 | public void SendChildAgentDataUpdate(AgentPosition cAgentData, ScenePresence presence) |
145 | { | 144 | { |
146 | // This assumes that we know what our neighbors are. | 145 | // This assumes that we know what our neighbors are. |
@@ -158,15 +157,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
158 | Utils.LongToUInts(regionHandle, out x, out y); | 157 | Utils.LongToUInts(regionHandle, out x, out y); |
159 | GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); | 158 | GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); |
160 | bool v = true; | 159 | bool v = true; |
161 | if (! simulatorList.Contains(dest.ServerURI) && !_failedSims.TryGetValue(dest.ServerURI, out v)) | 160 | if (! simulatorList.Contains(dest.ServerURI)) |
162 | { | 161 | { |
163 | // we havent seen this simulator before, add it to the list | 162 | // we havent seen this simulator before, add it to the list |
164 | // and send it an update | 163 | // and send it an update |
165 | simulatorList.Add(dest.ServerURI); | 164 | simulatorList.Add(dest.ServerURI); |
166 | // Let move this to sync. Mono definitely does not like async networking. | 165 | // Let move this to sync. Mono definitely does not like async networking. |
167 | if (!m_scene.SimulationService.UpdateAgent(dest, cAgentData)) | 166 | m_scene.SimulationService.UpdateAgent(dest, cAgentData); |
168 | // Also if it fails, get it out of the loop for a bit | ||
169 | _failedSims.Add(dest.ServerURI, true, 120); | ||
170 | 167 | ||
171 | // Leaving this here as a reminder that we tried, and it sucks. | 168 | // Leaving this here as a reminder that we tried, and it sucks. |
172 | //SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; | 169 | //SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; |