diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/UDPServer.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 64381b4..f91e5e2 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -120,6 +120,7 @@ namespace OpenSim.Region.ClientStack | |||
120 | case SocketError.AlreadyInProgress: | 120 | case SocketError.AlreadyInProgress: |
121 | case SocketError.NetworkReset: | 121 | case SocketError.NetworkReset: |
122 | case SocketError.ConnectionReset: | 122 | case SocketError.ConnectionReset: |
123 | |||
123 | try | 124 | try |
124 | { | 125 | { |
125 | CloseEndPoint(epSender); | 126 | CloseEndPoint(epSender); |
@@ -154,6 +155,23 @@ namespace OpenSim.Region.ClientStack | |||
154 | { | 155 | { |
155 | //MainLog.Instance.Verbose("UDPSERVER", a.ToString()); | 156 | //MainLog.Instance.Verbose("UDPSERVER", a.ToString()); |
156 | } | 157 | } |
158 | try | ||
159 | { | ||
160 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | ||
161 | |||
162 | // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. | ||
163 | // so therefore.. we've got to tell the server to BeginReceiveFrom again. | ||
164 | // This will happen over and over until we've gone through all packets | ||
165 | // sent to and from this particular user. | ||
166 | // Stupid I know.. | ||
167 | // but Flusing the buffer would be even more stupid... so, we're stuck with this ugly method. | ||
168 | |||
169 | } | ||
170 | catch (SocketException) | ||
171 | { | ||
172 | |||
173 | } | ||
174 | |||
157 | // Here's some reference code! :D | 175 | // Here's some reference code! :D |
158 | // Shutdown and restart the UDP listener! hehe | 176 | // Shutdown and restart the UDP listener! hehe |
159 | // Shiny | 177 | // Shiny |