From c6fe7cbe28bde697c7991424fcbdf443f85903e1 Mon Sep 17 00:00:00 2001 From: Forest Date: Wed, 7 Oct 2020 17:02:36 -0700 Subject: [PATCH] A couple subtle changes --- Hazel/FewerThreads/ThreadLimitedUdpConnectionListener.cs | 1 + Hazel/Udp/UdpConnectionListener.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Hazel/FewerThreads/ThreadLimitedUdpConnectionListener.cs b/Hazel/FewerThreads/ThreadLimitedUdpConnectionListener.cs index f6020f5..78c061c 100644 --- a/Hazel/FewerThreads/ThreadLimitedUdpConnectionListener.cs +++ b/Hazel/FewerThreads/ThreadLimitedUdpConnectionListener.cs @@ -85,6 +85,7 @@ namespace Hazel.Udp.FewerThreads this.receiveQueue = new BlockingCollection(10000); this.socket = UdpConnection.CreateSocket(this.IPMode); + this.socket.ExclusiveAddressUse = true; this.socket.Blocking = false; this.socket.ReceiveBufferSize = SendReceiveBufferSize; diff --git a/Hazel/Udp/UdpConnectionListener.cs b/Hazel/Udp/UdpConnectionListener.cs index 59089bf..8dbec1b 100644 --- a/Hazel/Udp/UdpConnectionListener.cs +++ b/Hazel/Udp/UdpConnectionListener.cs @@ -271,7 +271,7 @@ namespace Hazel.Udp } catch (SocketException e) { - throw new HazelException("Could not send data as a SocketException occurred.", e); + this.Logger?.Invoke("Could not send data as a SocketException occurred: " + e); } catch (ObjectDisposedException) { -- 2.39.5