mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
Fix to the scenario where we send an agent to a neighbouring sim (via teleport), then tell our neighbours to close the agents.. thereby disconnecting the user. Added a new CloseChildAgent method in lieu of CloseAgent. This has been a long standing problem - with any luck this will cure it.
This commit is contained in:
@@ -442,7 +442,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool CloseAgent(GridRegion destination, UUID id)
|
||||
private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly)
|
||||
{
|
||||
string uri = string.Empty;
|
||||
try
|
||||
@@ -459,6 +459,8 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
|
||||
WebRequest request = WebRequest.Create(uri);
|
||||
request.Method = "DELETE";
|
||||
if (ChildOnly)
|
||||
request.Method += "CHILD";
|
||||
request.Timeout = 10000;
|
||||
|
||||
StreamReader sr = null;
|
||||
@@ -491,6 +493,16 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool CloseChildAgent(GridRegion destination, UUID id)
|
||||
{
|
||||
return CloseAgent(destination, id, true);
|
||||
}
|
||||
|
||||
public bool CloseAgent(GridRegion destination, UUID id)
|
||||
{
|
||||
return CloseAgent(destination, id, false);
|
||||
}
|
||||
|
||||
#endregion Agents
|
||||
|
||||
#region Objects
|
||||
|
||||
Reference in New Issue
Block a user