diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-07-01 16:34:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-01 16:34:34 -0400 |
| commit | 5caddb242beba3cbaa0c1ca94f7fa07f73309ddb (patch) | |
| tree | 80667788edc7d57bd94bb55ff2d532423b7d89bf | |
| parent | 1140bcc669f040027cac2c083f0d84f3187e1ffe (diff) | |
| parent | 2272363197660939ec5474ea76fca2f9445993be (diff) | |
Merge pull request #3431 from BaronGreenback/3404
Fix for #3404
| -rw-r--r-- | Emby.Server.Implementations/Net/SocketFactory.cs | 3 | ||||
| -rw-r--r-- | RSSDP/SsdpCommunicationsServer.cs | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Net/SocketFactory.cs b/Emby.Server.Implementations/Net/SocketFactory.cs index 177721658..0781a0e33 100644 --- a/Emby.Server.Implementations/Net/SocketFactory.cs +++ b/Emby.Server.Implementations/Net/SocketFactory.cs @@ -19,6 +19,7 @@ namespace Emby.Server.Implementations.Net var retVal = new Socket(AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Dgram, System.Net.Sockets.ProtocolType.Udp); try { + retVal.EnableBroadcast = true; retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1); @@ -46,6 +47,7 @@ namespace Emby.Server.Implementations.Net var retVal = new Socket(AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Dgram, System.Net.Sockets.ProtocolType.Udp); try { + retVal.EnableBroadcast = true; retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); retVal.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 4); @@ -112,6 +114,7 @@ namespace Emby.Server.Implementations.Net try { + retVal.EnableBroadcast = true; // retVal.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true); retVal.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, multicastTimeToLive); diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index 8fde700e0..a4be32e7d 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -339,7 +339,6 @@ namespace Rssdp.Infrastructure private ISocket ListenForBroadcastsAsync() { var socket = _SocketFactory.CreateUdpMulticastSocket(SsdpConstants.MulticastLocalAdminAddress, _MulticastTtl, SsdpConstants.MulticastPort); - _ = ListenToSocketInternal(socket); return socket; |
