aboutsummaryrefslogtreecommitdiff
path: root/RSSDP
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:59:37 +0100
committerGitHub <noreply@github.com>2019-01-13 21:59:37 +0100
commit9d0a08571e18328e6d24e4611bab386aa5a25d29 (patch)
treebc9ffac0ffd5c4e3092af1026bee58dc66f21775 /RSSDP
parent23f5c1d90b8d1e8baac7c20fd01a391cacd5c60a (diff)
parentf8dd182e422db49d98cc090f4e205cc46517f610 (diff)
Merge branch 'dev' into reformat
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 abd0dbdad..04e76ef59 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 ex)
+ {
+ _logger.LogError("Failed to bind to port 1900: {Message}. DLNA will be unavailable", ex.Message);
+ }
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;
}