aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/SsdpCommunicationsServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'RSSDP/SsdpCommunicationsServer.cs')
-rw-r--r--RSSDP/SsdpCommunicationsServer.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs
index 8f1f0fa61..e49c0e77b 100644
--- a/RSSDP/SsdpCommunicationsServer.cs
+++ b/RSSDP/SsdpCommunicationsServer.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Net.Http;
@@ -42,7 +43,7 @@ namespace Rssdp.Infrastructure
private HttpResponseParser _ResponseParser;
private readonly ILogger _logger;
private ISocketFactory _SocketFactory;
- private readonly INetworkManager _networkManager;
+ private readonly INetworkManager _networkManager;
private int _LocalPort;
private int _MulticastTtl;
@@ -68,7 +69,7 @@ namespace Rssdp.Infrastructure
INetworkManager networkManager, ILogger logger, bool enableMultiSocketBinding)
: this(socketFactory, 0, SsdpConstants.SsdpDefaultMulticastTimeToLive, networkManager, logger, enableMultiSocketBinding)
{
-
+
}
/// <summary>
@@ -358,7 +359,7 @@ namespace Rssdp.Infrastructure
{
// Not support IPv6 right now
continue;
- }
+ }
try
{
@@ -415,10 +416,7 @@ namespace Rssdp.Infrastructure
{
lock (_SendSocketSynchroniser)
{
- if (_sendSockets == null)
- {
- _sendSockets = CreateSocketAndListenForResponsesAsync();
- }
+ _sendSockets ??= CreateSocketAndListenForResponsesAsync();
}
}
}