aboutsummaryrefslogtreecommitdiff
path: root/RSSDP
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2019-01-12 22:25:55 +0100
committerBond_009 <bond.009@outlook.com>2019-01-12 22:25:55 +0100
commit783e74d9c9fd212497c40a5f9678552d85c9512c (patch)
tree976ae88a1f9db4af55bf6ebb5b1c655d58770c1d /RSSDP
parent78a5d999f4e5c92dfc70d4428f88a3c6597dea9d (diff)
Don't print stacktrace when failing to bind to 1900
Diffstat (limited to 'RSSDP')
-rw-r--r--RSSDP/SsdpCommunicationsServer.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs
index e2e5c4e9f..c64b6d02f 100644
--- a/RSSDP/SsdpCommunicationsServer.cs
+++ b/RSSDP/SsdpCommunicationsServer.cs
@@ -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;
@@ -126,6 +126,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");
@@ -145,7 +149,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;
}