From 8f838c722da978da646fcef59a5af767840832bb Mon Sep 17 00:00:00 2001
From: Tom Grimshaw
Date: Mon, 17 May 2010 14:14:19 -0700
Subject: When killing a zombie session, don't send the stop packet since it
often has the effect of killing a newly connected client.
---
OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 18 +++++++++++++++---
OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 5 +++++
OpenSim/Region/Framework/Scenes/Scene.cs | 2 +-
.../InternetRelayClientView/Server/IRCClientView.cs | 5 +++++
OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 +++++
5 files changed, 31 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index d5fda9d..5670a78 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -502,18 +502,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Client Methods
+
///
/// Shut down the client view
///
public void Close()
{
+ Close(true);
+ }
+
+ ///
+ /// Shut down the client view
+ ///
+ public void Close(bool sendStop)
+ {
m_log.DebugFormat(
"[CLIENT]: Close has been called for {0} attached to scene {1}",
Name, m_scene.RegionInfo.RegionName);
- // Send the STOP packet
- DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
- OutPacket(disable, ThrottleOutPacketType.Unknown);
+ if (sendStop)
+ {
+ // Send the STOP packet
+ DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
+ OutPacket(disable, ThrottleOutPacketType.Unknown);
+ }
IsActive = false;
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 09611af..84385ad 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -831,6 +831,11 @@ namespace OpenSim.Region.Examples.SimpleModule
public void Close()
{
+ Close(true);
+ }
+
+ public void Close(bool sendStop)
+ {
}
public void Start()
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3d59615..1b08c50 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3489,7 +3489,7 @@ namespace OpenSim.Region.Framework.Scenes
{
// We have a zombie from a crashed session. Kill it.
m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName);
- sp.ControllingClient.Close();
+ sp.ControllingClient.Close(false);
}
}
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 69e78b3..7c0fe4c 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -885,6 +885,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public void Close()
{
+ Close(true);
+ }
+
+ public void Close(bool sendStop)
+ {
Disconnect();
}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 6360c99..4323c94 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -845,6 +845,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public void Close()
{
+ Close(true);
+ }
+
+ public void Close(bool sendStop)
+ {
}
public void Start()
--
cgit v1.1