mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-13 05:36:36 +00:00
Don't print stacktrace when failing to bind to 1900
This commit is contained in:
committed by
Joshua Boniface
parent
30fef79120
commit
5348fddc9e
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -129,6 +129,10 @@ namespace Rssdp.Infrastructure
|
||||
{
|
||||
_BroadcastListenSocket = ListenForBroadcastsAsync();
|
||||
}
|
||||
catch (SocketException)
|
||||
{
|
||||
_logger.LogError("Failed to bind to port 1900. DLNA will be unavailable");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error in BeginListeningForBroadcasts");
|
||||
@@ -148,7 +152,7 @@ namespace Rssdp.Infrastructure
|
||||
{
|
||||
if (_BroadcastListenSocket != null)
|
||||
{
|
||||
_logger.LogInformation("{0} disposing _BroadcastListenSocket.", GetType().Name);
|
||||
_logger.LogInformation("{0} disposing _BroadcastListenSocket", GetType().Name);
|
||||
_BroadcastListenSocket.Dispose();
|
||||
_BroadcastListenSocket = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user