When killing a zombie session, don't send the stop packet since it often has the effect of killing a newly connected client.

avinationmerge
Tom Grimshaw 2010-05-17 14:14:19 -07:00
parent a003c36de5
commit 8f838c722d
10 changed files with 55 additions and 5 deletions

View File

@ -834,11 +834,19 @@ namespace OpenSim.Client.MXP.ClientStack
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
m_log.Info("[MXP ClientStack] Close Called");
// Tell the client to go
SendLogoutPacket();
if (sendStop == true)
{
SendLogoutPacket();
}
// Let MXPPacketServer clean it up
if (Session.SessionState != SessionState.Disconnected)

View File

@ -445,6 +445,11 @@ namespace OpenSim.Client.Sirikata.ClientStack
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
throw new System.NotImplementedException();
}

View File

@ -451,6 +451,11 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
throw new System.NotImplementedException();
}

View File

@ -1114,6 +1114,7 @@ namespace OpenSim.Framework
void InPacket(object NewPack);
void ProcessInPacket(Packet NewPack);
void Close();
void Close(bool sendStop);
void Kick(string message);
/// <summary>

View File

@ -502,18 +502,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Client Methods
/// <summary>
/// Shut down the client view
/// </summary>
public void Close()
{
Close(true);
}
/// <summary>
/// Shut down the client view
/// </summary>
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;

View File

@ -830,6 +830,11 @@ namespace OpenSim.Region.Examples.SimpleModule
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
}

View File

@ -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);
}
}

View File

@ -884,6 +884,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
Disconnect();
}

View File

@ -844,6 +844,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
}

View File

@ -887,6 +887,10 @@ namespace OpenSim.Tests.Common.Mock
}
public void Close()
{
Close(true);
}
public void Close(bool sendStop)
{
m_scene.RemoveClient(AgentId);
}