aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs12
-rw-r--r--OpenSim/Region/ClientStack/PacketServer.cs12
2 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 363688f..6f25191 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack
53 { 53 {
54 ~ClientView() 54 ~ClientView()
55 { 55 {
56 m_log.Info("[CLIENTVIEW]: Dstructor called"); 56 System.Console.WriteLine("[CLIENTVIEW]: Destructor called");
57 } 57 }
58 58
59 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 59 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@@ -237,6 +237,10 @@ namespace OpenSim.Region.ClientStack
237 private void CloseCleanup() 237 private void CloseCleanup()
238 { 238 {
239 m_scene.RemoveClient(AgentId); 239 m_scene.RemoveClient(AgentId);
240
241 //m_log.Info(String.Format("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)));
242 //m_log.Info(String.Format("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)));
243
240 // Send the STOP packet 244 // Send the STOP packet
241 DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); 245 DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
242 OutPacket(disable, ThrottleOutPacketType.Task); 246 OutPacket(disable, ThrottleOutPacketType.Task);
@@ -264,6 +268,11 @@ namespace OpenSim.Region.ClientStack
264 m_clientThread.Abort(); 268 m_clientThread.Abort();
265 } 269 }
266 270
271 /// <summary>
272 /// Close down the client view. This *must* be the last method called, since the last #
273 /// statement of CloseCleanup() aborts the thread.
274 /// </summary>
275 /// <param name="ShutdownCircult"></param>
267 public void Close(bool ShutdownCircult) 276 public void Close(bool ShutdownCircult)
268 { 277 {
269 // Pull Client out of Region 278 // Pull Client out of Region
@@ -273,7 +282,6 @@ namespace OpenSim.Region.ClientStack
273 if (ShutdownCircult) 282 if (ShutdownCircult)
274 OnConnectionClosed(this); 283 OnConnectionClosed(this);
275 284
276
277 CloseCleanup(); 285 CloseCleanup();
278 } 286 }
279 287
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs
index 9608ce5..7036de93 100644
--- a/OpenSim/Region/ClientStack/PacketServer.cs
+++ b/OpenSim/Region/ClientStack/PacketServer.cs
@@ -25,6 +25,8 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28
29using System;
28using System.Net; 30using System.Net;
29using System.Net.Sockets; 31using System.Net.Sockets;
30using libsecondlife; 32using libsecondlife;
@@ -133,13 +135,17 @@ namespace OpenSim.Region.ClientStack
133 //m_scene.ClientManager.CloseAllAgents(circuitcode); 135 //m_scene.ClientManager.CloseAllAgents(circuitcode);
134 } 136 }
135 137
138 /// <summary>
139 /// Completely close down the given client.
140 /// </summary>
141 /// <param name="client"></param>
136 public virtual void CloseClient(IClientAPI client) 142 public virtual void CloseClient(IClientAPI client)
137 { 143 {
138 //m_log.Info("PacketServer:CloseClient()"); 144 m_log.Info("PacketServer:CloseClient()");
139 145
140 CloseCircuit(client.CircuitCode); 146 CloseCircuit(client.CircuitCode);
147 m_scene.ClientManager.Remove(client.CircuitCode);
141 client.Close(false); 148 client.Close(false);
142 m_scene.ClientManager.Remove(client.CircuitCode);
143 } 149 }
144 } 150 }
145} 151}