r 2113 introduced a leak, this should fix the leak

afrisby
Tleiades Hax 2007-10-19 06:10:35 +00:00
parent 6f70d6964a
commit d79a3cc5e1
1 changed files with 12 additions and 2 deletions

View File

@ -1065,6 +1065,14 @@ namespace OpenSim.Region.Environment.Scenes
delegate void InformClientOfNeighbourDelegate(IClientAPI remoteClient, AgentCircuitData a, ulong regionHandle, IPEndPoint endPoint); delegate void InformClientOfNeighbourDelegate(IClientAPI remoteClient, AgentCircuitData a, ulong regionHandle, IPEndPoint endPoint);
private void InformClientOfNeighbourCompleted(IAsyncResult iar)
{
InformClientOfNeighbourDelegate icon = (InformClientOfNeighbourDelegate)iar.AsyncState;
icon.EndInvoke(iar);
}
/// <summary> /// <summary>
/// Async compnent for informing client of which neighbours exists /// Async compnent for informing client of which neighbours exists
/// </summary> /// </summary>
@ -1075,7 +1083,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="a"></param> /// <param name="a"></param>
/// <param name="regionHandle"></param> /// <param name="regionHandle"></param>
/// <param name="endPoint"></param> /// <param name="endPoint"></param>
public void InformClientOfNeighbourAsync(IClientAPI remoteClient, AgentCircuitData a, ulong regionHandle, IPEndPoint endPoint) private void InformClientOfNeighbourAsync(IClientAPI remoteClient, AgentCircuitData a, ulong regionHandle, IPEndPoint endPoint)
{ {
bool regionAccepted = commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, a); bool regionAccepted = commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, a);
@ -1100,7 +1108,9 @@ namespace OpenSim.Region.Environment.Scenes
agent.child = true; agent.child = true;
InformClientOfNeighbourDelegate d = new InformClientOfNeighbourDelegate(InformClientOfNeighbourAsync); InformClientOfNeighbourDelegate d = new InformClientOfNeighbourDelegate(InformClientOfNeighbourAsync);
IAsyncResult asyncInform = d.BeginInvoke(remoteClient, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint, null, null); IAsyncResult asyncInform = d.BeginInvoke(remoteClient, agent, neighbours[i].RegionHandle, neighbours[i].ExternalEndPoint,
new AsyncCallback(InformClientOfNeighbourCompleted),
null);
//this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort); //this.capsHandlers[remoteClient.AgentId].CreateEstablishAgentComms("", System.Net.IPAddress.Parse(neighbours[i].CommsIPListenAddr) + ":" + neighbours[i].CommsIPListenPort);
} }
} }