diff options
| author | Xu Fasheng <fasheng.xu@gmail.com> | 2019-02-23 10:15:38 +0800 |
|---|---|---|
| committer | Xu Fasheng <fasheng.xu@gmail.com> | 2019-02-23 10:15:38 +0800 |
| commit | 47966793c0b9ca1d79f35f6010c0a256a4ab12b0 (patch) | |
| tree | a641477c380134c8e255241423950ead9c3316f4 /RSSDP | |
| parent | 0c49079c16f62c85fe529150a9777e9f2ccc440f (diff) | |
Remove useless if..else in SsdpDevicePublisher
Diffstat (limited to 'RSSDP')
| -rw-r--r-- | RSSDP/SsdpDevicePublisher.cs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index 076246b24..921f33c21 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -438,12 +438,7 @@ namespace Rssdp.Infrastructure var 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.Infrastructure var 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() |
