put in a try block to catch the ForEach loop dying.
parent
6b5db310cd
commit
c7f5a94763
|
@ -206,6 +206,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
// Pull Client out of Region
|
// Pull Client out of Region
|
||||||
|
MainLog.Instance.Verbose("CLIENT", "Close has been called");
|
||||||
|
|
||||||
m_scene.RemoveClient(AgentId);
|
m_scene.RemoveClient(AgentId);
|
||||||
|
|
||||||
// Send the STOP packet
|
// Send the STOP packet
|
||||||
|
@ -216,6 +218,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
PacketQueue.Close();
|
PacketQueue.Close();
|
||||||
PacketQueue.Flush();
|
PacketQueue.Flush();
|
||||||
|
|
||||||
|
Thread.Sleep(2000);
|
||||||
|
|
||||||
// Shut down timers
|
// Shut down timers
|
||||||
AckTimer.Stop();
|
AckTimer.Stop();
|
||||||
clientPingTimer.Stop();
|
clientPingTimer.Stop();
|
||||||
|
@ -223,7 +227,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
// This is just to give the client a reasonable chance of
|
// This is just to give the client a reasonable chance of
|
||||||
// flushing out all it's packets. There should probably
|
// flushing out all it's packets. There should probably
|
||||||
// be a better mechanism here
|
// be a better mechanism here
|
||||||
Thread.Sleep(2000);
|
|
||||||
|
|
||||||
ClientThread.Abort();
|
ClientThread.Abort();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1898,10 +1898,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// We don't want to try to send messages if there are no avatar.
|
// We don't want to try to send messages if there are no avatar.
|
||||||
if (!(m_scenePresences.Equals(null)))
|
if (!(m_scenePresences.Equals(null)))
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
foreach (ScenePresence presence in m_scenePresences.Values)
|
foreach (ScenePresence presence in m_scenePresences.Values)
|
||||||
{
|
{
|
||||||
action(presence);
|
action(presence);
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
MainLog.Instance.Verbose("BUG", e.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue