diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/UDPServer.cs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 64ed4b4..9a3d01a 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -103,18 +103,24 @@ namespace OpenSim.Region.ClientStack | |||
103 | Packet packet = null; | 103 | Packet packet = null; |
104 | 104 | ||
105 | int numBytes; | 105 | int numBytes; |
106 | 106 | ||
107 | try | 107 | try |
108 | { | 108 | { |
109 | numBytes = Server.EndReceiveFrom(result, ref epSender); | 109 | numBytes = Server.EndReceiveFrom(result, ref epSender); |
110 | } | 110 | } |
111 | catch (System.Net.Sockets.SocketException e) | 111 | catch (System.Net.Sockets.SocketException e) |
112 | { | 112 | { |
113 | Console.WriteLine("Remote host Closed connection"); | 113 | // TODO : Actually only handle those states that we have control over, re-throw everything else, |
114 | 114 | // TODO: implement cases as we encounter them. | |
115 | CloseEndPoint(epSender); | 115 | switch (e.SocketErrorCode) |
116 | 116 | { | |
117 | //Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | 117 | case SocketError.AlreadyInProgress: |
118 | case SocketError.NetworkReset: | ||
119 | default: | ||
120 | Console.WriteLine("Remote host Closed connection"); | ||
121 | CloseEndPoint(epSender); | ||
122 | break; | ||
123 | } | ||
118 | 124 | ||
119 | return; | 125 | return; |
120 | } | 126 | } |