mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 05:53:03 +03:00
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.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user