aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/EntryPoints
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2020-07-18 19:21:43 +0200
committerDavid <daullmer@gmail.com>2020-07-18 19:21:43 +0200
commit0e1bf316b5c8da1d1f334fabe4a0abf77185f2e0 (patch)
treedd59ea68b275ec8125ca454422cd027d891de477 /Emby.Server.Implementations/EntryPoints
parentfa4e0a73d5eb0b33dc85dffb2a2d35033c5ce698 (diff)
parent09c05ff9faff4fd5013e19fad74835bdf796393f (diff)
Merge branch 'master' of github.com:jellyfin/jellyfin into socket-binding
Diffstat (limited to 'Emby.Server.Implementations/EntryPoints')
-rw-r--r--Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs
index b207397bd..9486874d5 100644
--- a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs
+++ b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs
@@ -1,3 +1,4 @@
+using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
using Emby.Server.Implementations.Udp;
@@ -48,8 +49,16 @@ namespace Emby.Server.Implementations.EntryPoints
/// <inheritdoc />
public Task RunAsync()
{
- _udpServer = new UdpServer(_logger, _appHost, _config);
- _udpServer.Start(PortNumber, _cancellationTokenSource.Token);
+ try
+ {
+ _udpServer = new UdpServer(_logger, _appHost, _config);
+ _udpServer.Start(PortNumber, _cancellationTokenSource.Token);
+ }
+ catch (SocketException ex)
+ {
+ _logger.LogWarning(ex, "Unable to start AutoDiscovery listener on UDP port {PortNumber}", PortNumber);
+ }
+
return Task.CompletedTask;
}