diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-06-24 17:23:16 +0100 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-06-24 17:23:16 +0100 |
| commit | f01baad05e5abc8875fa36f9075f8684857115e7 (patch) | |
| tree | 9f5b9e55e889f260726395cdfd832806cf3287c9 /RSSDP | |
| parent | c07d8abfd57fbdc67ad2a0189e1c6149b8244a65 (diff) | |
Sending multicasts out of Sockets without setting the broadcast to true - causes the error "Bad value for ai_flags" on some systems (#3404)
The underlying cause looks to be https://github.com/dotnet/runtime/issues/28630.
Basically, it's an access denied bug.
It looks like multicasts need the same access rights as broadcasts on some systems.
Diffstat (limited to 'RSSDP')
| -rw-r--r-- | RSSDP/SsdpCommunicationsServer.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index 0ff56ebac..3c52a0c2f 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -338,7 +338,8 @@ namespace Rssdp.Infrastructure private ISocket ListenForBroadcastsAsync() { - var socket = _SocketFactory.CreateUdpMulticastSocket(SsdpConstants.MulticastLocalAdminAddress, _MulticastTtl, SsdpConstants.MulticastPort); + var socket = _SocketFactory.CreateUdpMulticastSocket(SsdpConstants.MulticastLocalAdminAddress, _MulticastTtl, SsdpConstants.MulticastPort); + _ = ListenToSocketInternal(socket); return socket; @@ -382,7 +383,7 @@ namespace Rssdp.Infrastructure private async Task ListenToSocketInternal(ISocket socket) { var cancelled = false; - var receiveBuffer = new byte[8192]; + var receiveBuffer = new byte[8192]; while (!cancelled && !IsDisposed) { |
