aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs8
-rw-r--r--OpenSim/Region/ClientStack/ClientViewBase.cs4
-rw-r--r--OpenSim/Region/ClientStack/PacketServer.cs8
-rw-r--r--OpenSim/Region/ClientStack/UDPServer.cs18
4 files changed, 37 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index ff527fb..52fc568 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -128,6 +128,14 @@ namespace OpenSim.Region.ClientStack
128 m_networkServer.RemoveClientCircuit(this.CircuitCode); 128 m_networkServer.RemoveClientCircuit(this.CircuitCode);
129 this.ClientThread.Abort(); 129 this.ClientThread.Abort();
130 } 130 }
131
132 public override void ConnectionClosed()
133 {
134 clientPingTimer.Stop();
135 m_clientThreads.Remove(this.CircuitCode);
136 m_networkServer.RemoveClientCircuit(this.CircuitCode);
137 this.ClientThread.Abort();
138 }
131 #endregion 139 #endregion
132 140
133 # region Packet Handling 141 # region Packet Handling
diff --git a/OpenSim/Region/ClientStack/ClientViewBase.cs b/OpenSim/Region/ClientStack/ClientViewBase.cs
index 0b2c875..8a7c764 100644
--- a/OpenSim/Region/ClientStack/ClientViewBase.cs
+++ b/OpenSim/Region/ClientStack/ClientViewBase.cs
@@ -315,6 +315,10 @@ namespace OpenSim.Region.ClientStack
315 315
316 } 316 }
317 317
318 public virtual void ConnectionClosed()
319 {
320 }
321
318 #region Nested Classes 322 #region Nested Classes
319 323
320 public class QueItem 324 public class QueItem
diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs
index 66a7ffd..59f11d5 100644
--- a/OpenSim/Region/ClientStack/PacketServer.cs
+++ b/OpenSim/Region/ClientStack/PacketServer.cs
@@ -74,6 +74,14 @@ namespace OpenSim.Region.ClientStack
74 } 74 }
75 } 75 }
76 76
77 public virtual void ConnectionClosed(uint circuitCode)
78 {
79 if (this.ClientThreads.ContainsKey(circuitCode))
80 {
81 ClientThreads[circuitCode].ConnectionClosed();
82 }
83 }
84
77 /// <summary> 85 /// <summary>
78 /// 86 ///
79 /// </summary> 87 /// </summary>
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs
index 45eb0cd..8b4a3cb 100644
--- a/OpenSim/Region/ClientStack/UDPServer.cs
+++ b/OpenSim/Region/ClientStack/UDPServer.cs
@@ -101,7 +101,23 @@ namespace OpenSim.Region.ClientStack
101 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); 101 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
102 epSender = (EndPoint)ipeSender; 102 epSender = (EndPoint)ipeSender;
103 Packet packet = null; 103 Packet packet = null;
104 int numBytes = Server.EndReceiveFrom(result, ref epSender); 104
105 int numBytes;
106
107 try
108 {
109 numBytes = Server.EndReceiveFrom(result, ref epSender);
110 }
111 catch (System.Net.Sockets.SocketException)
112 {
113 Console.WriteLine("Remote host Closed connection");
114 this._packetServer.ConnectionClosed(this.clientCircuits[epSender]);
115 ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
116 epSender = (EndPoint)ipeSender;
117 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
118 return;
119 }
120
105 int packetEnd = numBytes - 1; 121 int packetEnd = numBytes - 1;
106 122
107 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer); 123 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);