The Free Software Media System - Server Backend & API
Remove useless if..else in SsdpDevicePublisher
Xu Fasheng47966793c0b9
diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.csindex 076246b243..921f33c212 100644--- a/RSSDP/SsdpDevicePublisher.cs+++ b/RSSDP/SsdpDevicePublisher.cs@@ -438,12 +438,7 @@ namespace Rssdp.Infrastructurevar message = BuildMessage(header, values);- if (_sendOnlyMatchedHost)- {- _CommsServer.SendMulticastMessage(message, _sendOnlyMatchedHost ? rootDevice.Address : null, cancellationToken);- } else {- _CommsServer.SendMulticastMessage(message, null, cancellationToken);- }+ _CommsServer.SendMulticastMessage(message, _sendOnlyMatchedHost ? rootDevice.Address : null, cancellationToken);//WriteTrace(String.Format("Sent alive notification"), device);}@@ -488,13 +483,7 @@ namespace Rssdp.Infrastructurevar sendCount = IsDisposed ? 1 : 3;WriteTrace(String.Format("Sent byebye notification"), device);- if (_sendOnlyMatchedHost)- {- return _CommsServer.SendMulticastMessage(message, sendCount,- _sendOnlyMatchedHost ? device.ToRootDevice().Address : null, cancellationToken);- } else {- return _CommsServer.SendMulticastMessage(message, sendCount, null, cancellationToken);- }+ return _CommsServer.SendMulticastMessage(message, sendCount, _sendOnlyMatchedHost ? device.ToRootDevice().Address : null, cancellationToken);}private void DisposeRebroadcastTimer()