aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2007-12-11 22:20:22 +0000
committerSean Dague2007-12-11 22:20:22 +0000
commitc7f5a9476373260af44154103e488830f9f25bb4 (patch)
treebb76592096de4b8129c0729811d0f47acfe4f381
parentdebug to catch any users of the stop interface (diff)
downloadopensim-SC_OLD-c7f5a9476373260af44154103e488830f9f25bb4.zip
opensim-SC_OLD-c7f5a9476373260af44154103e488830f9f25bb4.tar.gz
opensim-SC_OLD-c7f5a9476373260af44154103e488830f9f25bb4.tar.bz2
opensim-SC_OLD-c7f5a9476373260af44154103e488830f9f25bb4.tar.xz
put in a try block to catch the ForEach loop dying.
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs10
2 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index adb6b72..750226d 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -206,6 +206,8 @@ namespace OpenSim.Region.ClientStack
206 public void Close() 206 public void Close()
207 { 207 {
208 // Pull Client out of Region 208 // Pull Client out of Region
209 MainLog.Instance.Verbose("CLIENT", "Close has been called");
210
209 m_scene.RemoveClient(AgentId); 211 m_scene.RemoveClient(AgentId);
210 212
211 // Send the STOP packet 213 // Send the STOP packet
@@ -215,6 +217,8 @@ namespace OpenSim.Region.ClientStack
215 // FLUSH Packets 217 // FLUSH Packets
216 PacketQueue.Close(); 218 PacketQueue.Close();
217 PacketQueue.Flush(); 219 PacketQueue.Flush();
220
221 Thread.Sleep(2000);
218 222
219 // Shut down timers 223 // Shut down timers
220 AckTimer.Stop(); 224 AckTimer.Stop();
@@ -223,7 +227,6 @@ namespace OpenSim.Region.ClientStack
223 // This is just to give the client a reasonable chance of 227 // This is just to give the client a reasonable chance of
224 // flushing out all it's packets. There should probably 228 // flushing out all it's packets. There should probably
225 // be a better mechanism here 229 // be a better mechanism here
226 Thread.Sleep(2000);
227 230
228 ClientThread.Abort(); 231 ClientThread.Abort();
229 } 232 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 5febce6..fef02f0 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1898,9 +1898,13 @@ namespace OpenSim.Region.Environment.Scenes
1898 // We don't want to try to send messages if there are no avatar. 1898 // We don't want to try to send messages if there are no avatar.
1899 if (!(m_scenePresences.Equals(null))) 1899 if (!(m_scenePresences.Equals(null)))
1900 { 1900 {
1901 foreach (ScenePresence presence in m_scenePresences.Values) 1901 try {
1902 { 1902 foreach (ScenePresence presence in m_scenePresences.Values)
1903 action(presence); 1903 {
1904 action(presence);
1905 }
1906 } catch (Exception e) {
1907 MainLog.Instance.Verbose("BUG", e.ToString());
1904 } 1908 }
1905 } 1909 }
1906 } 1910 }