diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 5fa4637..6f346d3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | |||
@@ -343,14 +343,12 @@ namespace OpenMetaverse | |||
343 | { | 343 | { |
344 | // kick off an async read | 344 | // kick off an async read |
345 | m_udpSocket.BeginReceiveFrom( | 345 | m_udpSocket.BeginReceiveFrom( |
346 | //wrappedBuffer.Instance.Data, | ||
347 | buf.Data, | 346 | buf.Data, |
348 | 0, | 347 | 0, |
349 | UDPPacketBuffer.BUFFER_SIZE, | 348 | buf.Data.Length, |
350 | SocketFlags.None, | 349 | SocketFlags.None, |
351 | ref buf.RemoteEndPoint, | 350 | ref buf.RemoteEndPoint, |
352 | AsyncEndReceive, | 351 | AsyncEndReceive, |
353 | //wrappedBuffer); | ||
354 | buf); | 352 | buf); |
355 | } | 353 | } |
356 | catch (SocketException e) | 354 | catch (SocketException e) |
@@ -364,14 +362,12 @@ namespace OpenMetaverse | |||
364 | try | 362 | try |
365 | { | 363 | { |
366 | m_udpSocket.BeginReceiveFrom( | 364 | m_udpSocket.BeginReceiveFrom( |
367 | //wrappedBuffer.Instance.Data, | ||
368 | buf.Data, | 365 | buf.Data, |
369 | 0, | 366 | 0, |
370 | UDPPacketBuffer.BUFFER_SIZE, | 367 | buf.Data.Length, |
371 | SocketFlags.None, | 368 | SocketFlags.None, |
372 | ref buf.RemoteEndPoint, | 369 | ref buf.RemoteEndPoint, |
373 | AsyncEndReceive, | 370 | AsyncEndReceive, |
374 | //wrappedBuffer); | ||
375 | buf); | 371 | buf); |
376 | salvaged = true; | 372 | salvaged = true; |
377 | } | 373 | } |
@@ -382,11 +378,6 @@ namespace OpenMetaverse | |||
382 | m_log.Warn("[UDPBASE]: Salvaged the UDP listener on port " + m_udpPort); | 378 | m_log.Warn("[UDPBASE]: Salvaged the UDP listener on port " + m_udpPort); |
383 | } | 379 | } |
384 | } | 380 | } |
385 | catch (ObjectDisposedException e) | ||
386 | { | ||
387 | m_log.Error( | ||
388 | string.Format("[UDPBASE]: Error processing UDP begin receive {0}. Exception ", UdpReceives), e); | ||
389 | } | ||
390 | catch (Exception e) | 381 | catch (Exception e) |
391 | { | 382 | { |
392 | m_log.Error( | 383 | m_log.Error( |
@@ -443,11 +434,6 @@ namespace OpenMetaverse | |||
443 | UdpReceives, se.ErrorCode), | 434 | UdpReceives, se.ErrorCode), |
444 | se); | 435 | se); |
445 | } | 436 | } |
446 | catch (ObjectDisposedException e) | ||
447 | { | ||
448 | m_log.Error( | ||
449 | string.Format("[UDPBASE]: Error processing UDP end receive {0}. Exception ", UdpReceives), e); | ||
450 | } | ||
451 | catch (Exception e) | 437 | catch (Exception e) |
452 | { | 438 | { |
453 | m_log.Error( | 439 | m_log.Error( |
@@ -502,6 +488,8 @@ namespace OpenMetaverse | |||
502 | */ | 488 | */ |
503 | public void SyncSend(UDPPacketBuffer buf) | 489 | public void SyncSend(UDPPacketBuffer buf) |
504 | { | 490 | { |
491 | if(buf.RemoteEndPoint == null) | ||
492 | return; // was already expired | ||
505 | try | 493 | try |
506 | { | 494 | { |
507 | m_udpSocket.SendTo( | 495 | m_udpSocket.SendTo( |
@@ -515,7 +503,7 @@ namespace OpenMetaverse | |||
515 | } | 503 | } |
516 | catch (SocketException e) | 504 | catch (SocketException e) |
517 | { | 505 | { |
518 | m_log.Warn("[UDPBASE]: sync send SocketException {0} " + e.Message); | 506 | m_log.WarnFormat("[UDPBASE]: sync send SocketException {0} {1}", buf.RemoteEndPoint, e.Message); |
519 | } | 507 | } |
520 | catch (ObjectDisposedException) { } | 508 | catch (ObjectDisposedException) { } |
521 | } | 509 | } |