aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs17
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 3648575..5ceea18 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -306,7 +306,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
306 } 306 }
307 catch (SocketException e) 307 catch (SocketException e)
308 { 308 {
309 m_log.ErrorFormat("[CLIENT]: BeginRecieve threw exception " + e.Message + ": " + e.StackTrace ); 309 // We don't need to see this error, reset connection and get next UDP packet off the buffer
310 // If the UDP packet is part of the same stream, this will happen several hundreds of times before
311 // the next set of UDP data is for a valid client.
312 //m_log.ErrorFormat("[CLIENT]: BeginRecieve threw exception " + e.Message + ": " + e.StackTrace );
313
314 // ENDLESS LOOP ON PURPOSE!
310 ResetEndPoint(); 315 ResetEndPoint();
311 } 316 }
312 } 317 }
@@ -322,10 +327,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
322 m_log.Error("[UDPSERVER]: " + a); 327 m_log.Error("[UDPSERVER]: " + a);
323 } 328 }
324 329
330 // ENDLESS LOOP ON PURPOSE!
331
332 // We need to purge the UDP stream of crap from the client that disconnected nastily or the UDP server will die
333 // The only way to do that is to beginreceive again!
334 BeginReceive();
335
325 try 336 try
326 { 337 {
327 m_socket.BeginReceiveFrom( 338 // m_socket.BeginReceiveFrom(
328 RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref reusedEpSender, ReceivedData, null); 339 // RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref reusedEpSender, ReceivedData, null);
329 340
330 // Ter: For some stupid reason ConnectionReset basically kills our async event structure.. 341 // Ter: For some stupid reason ConnectionReset basically kills our async event structure..
331 // so therefore.. we've got to tell the server to BeginReceiveFrom again. 342 // so therefore.. we've got to tell the server to BeginReceiveFrom again.