From fb7d824ac468afe5bc1018aae4fba9e5bfc94757 Mon Sep 17 00:00:00 2001 From: Soroush Date: Mon, 11 Jan 2016 21:23:52 +0330 Subject: [PATCH] Update DiscoveryHost.cs There is a possibility of an exception here for bad argument that can break the whole system apart. --- Rhino.Licensing/Discovery/DiscoveryHost.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Rhino.Licensing/Discovery/DiscoveryHost.cs b/Rhino.Licensing/Discovery/DiscoveryHost.cs index 89312d2..40d5153 100644 --- a/Rhino.Licensing/Discovery/DiscoveryHost.cs +++ b/Rhino.Licensing/Discovery/DiscoveryHost.cs @@ -45,8 +45,12 @@ private void SetSocketOptionsForNic(NetworkInterface nic) .ToList() .ForEach( address => - socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, - new MulticastOption(IPAddress.Parse(AllHostsMulticastIP), address.Address))); + { + try { + socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, + new MulticastOption(IPAddress.Parse(AllHostsMulticastIP), address.Address)); + } catch { } + }); } private void StartListening() @@ -155,4 +159,4 @@ public void Dispose() socket.Dispose(); } } -} \ No newline at end of file +}