mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Fix AutoDiscovery socket creation
This commit is contained in:
parent
a5bfeb28aa
commit
7af6694594
@ -82,7 +82,9 @@ namespace Emby.Server.Implementations.EntryPoints
|
|||||||
if (_enableMultiSocketBinding)
|
if (_enableMultiSocketBinding)
|
||||||
{
|
{
|
||||||
// Add global broadcast socket
|
// Add global broadcast socket
|
||||||
_udpServers.Add(new UdpServer(_logger, _appHost, _config, IPAddress.Broadcast, PortNumber));
|
var server = new UdpServer(_logger, _appHost, _config, IPAddress.Broadcast, PortNumber);
|
||||||
|
server.Start(_cancellationTokenSource.Token);
|
||||||
|
_udpServers.Add(server);
|
||||||
|
|
||||||
// Add bind address specific broadcast sockets
|
// Add bind address specific broadcast sockets
|
||||||
// IPv6 is currently unsupported
|
// IPv6 is currently unsupported
|
||||||
@ -90,9 +92,9 @@ namespace Emby.Server.Implementations.EntryPoints
|
|||||||
foreach (var intf in validInterfaces)
|
foreach (var intf in validInterfaces)
|
||||||
{
|
{
|
||||||
var broadcastAddress = NetworkExtensions.GetBroadcastAddress(intf.Subnet);
|
var broadcastAddress = NetworkExtensions.GetBroadcastAddress(intf.Subnet);
|
||||||
_logger.LogDebug("Binding UDP server to {Address} on port {PortNumber}", broadcastAddress.ToString(), PortNumber);
|
_logger.LogDebug("Binding UDP server to {Address} on port {PortNumber}", broadcastAddress, PortNumber);
|
||||||
|
|
||||||
var server = new UdpServer(_logger, _appHost, _config, broadcastAddress, PortNumber);
|
server = new UdpServer(_logger, _appHost, _config, broadcastAddress, PortNumber);
|
||||||
server.Start(_cancellationTokenSource.Token);
|
server.Start(_cancellationTokenSource.Token);
|
||||||
_udpServers.Add(server);
|
_udpServers.Add(server);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user