aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs20
1 files changed, 7 insertions, 13 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 2bff88a..f8ac1d8 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Region.ClientStack
71 private LLUUID newAssetFolder = LLUUID.Zero; 71 private LLUUID newAssetFolder = LLUUID.Zero;
72 private int debug = 0; 72 private int debug = 0;
73 protected IScene m_scene; 73 protected IScene m_scene;
74 private Dictionary<uint, IClientAPI> m_clientThreads; 74 private ClientManager m_clientManager;
75 private AssetCache m_assetCache; 75 private AssetCache m_assetCache;
76 // private InventoryCache m_inventoryCache; 76 // private InventoryCache m_inventoryCache;
77 private int cachedtextureserial = 0; 77 private int cachedtextureserial = 0;
@@ -83,12 +83,12 @@ namespace OpenSim.Region.ClientStack
83 private int probesWithNoIngressPackets = 0; 83 private int probesWithNoIngressPackets = 0;
84 private int lastPacketsReceived = 0; 84 private int lastPacketsReceived = 0;
85 85
86 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, IClientAPI> clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions) 86 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, ClientManager clientManager, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions)
87 { 87 {
88 m_moneyBalance = 1000; 88 m_moneyBalance = 1000;
89 89
90 m_scene = scene; 90 m_scene = scene;
91 m_clientThreads = clientThreads; 91 m_clientManager = clientManager;
92 m_assetCache = assetCache; 92 m_assetCache = assetCache;
93 93
94 m_networkServer = packServer; 94 m_networkServer = packServer;
@@ -127,24 +127,17 @@ namespace OpenSim.Region.ClientStack
127 127
128 # region Client Methods 128 # region Client Methods
129 129
130 public void KillClient() 130 public void Close()
131 { 131 {
132 clientPingTimer.Stop(); 132 clientPingTimer.Stop();
133 133
134 m_scene.RemoveClient(this.AgentId); 134 m_scene.RemoveClient(this.AgentId);
135 135
136 m_clientThreads.Remove(this.CircuitCode); 136 m_clientManager.Remove(this.CircuitCode); // TODO: Move out and delete ref to clientmanager.
137 m_networkServer.RemoveClientCircuit(this.CircuitCode); 137 m_networkServer.RemoveClientCircuit(this.CircuitCode);
138 this.ClientThread.Abort(); 138 this.ClientThread.Abort();
139 } 139 }
140 140
141 public void ConnectionClosed()
142 {
143 clientPingTimer.Stop();
144 m_clientThreads.Remove(this.CircuitCode);
145 m_networkServer.RemoveClientCircuit(this.CircuitCode);
146 this.ClientThread.Abort();
147 }
148 #endregion 141 #endregion
149 142
150 # region Packet Handling 143 # region Packet Handling
@@ -259,7 +252,8 @@ namespace OpenSim.Region.ClientStack
259 probesWithNoIngressPackets++; 252 probesWithNoIngressPackets++;
260 if (probesWithNoIngressPackets > 30) 253 if (probesWithNoIngressPackets > 30)
261 { 254 {
262 this.KillClient(); 255 // Refactor out this into an OnConnectionClosed so the ClientManager can clean up
256 this.Close();
263 } 257 }
264 else 258 else
265 { 259 {