mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
Remove useless if..else in SsdpDevicePublisher
This commit is contained in:
parent
0c49079c16
commit
47966793c0
@ -438,12 +438,7 @@ namespace Rssdp.Infrastructure
|
|||||||
|
|
||||||
var message = BuildMessage(header, values);
|
var message = BuildMessage(header, values);
|
||||||
|
|
||||||
if (_sendOnlyMatchedHost)
|
|
||||||
{
|
|
||||||
_CommsServer.SendMulticastMessage(message, _sendOnlyMatchedHost ? rootDevice.Address : null, cancellationToken);
|
_CommsServer.SendMulticastMessage(message, _sendOnlyMatchedHost ? rootDevice.Address : null, cancellationToken);
|
||||||
} else {
|
|
||||||
_CommsServer.SendMulticastMessage(message, null, cancellationToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
//WriteTrace(String.Format("Sent alive notification"), device);
|
//WriteTrace(String.Format("Sent alive notification"), device);
|
||||||
}
|
}
|
||||||
@ -488,13 +483,7 @@ namespace Rssdp.Infrastructure
|
|||||||
|
|
||||||
var sendCount = IsDisposed ? 1 : 3;
|
var sendCount = IsDisposed ? 1 : 3;
|
||||||
WriteTrace(String.Format("Sent byebye notification"), device);
|
WriteTrace(String.Format("Sent byebye notification"), device);
|
||||||
if (_sendOnlyMatchedHost)
|
return _CommsServer.SendMulticastMessage(message, sendCount, _sendOnlyMatchedHost ? device.ToRootDevice().Address : null, cancellationToken);
|
||||||
{
|
|
||||||
return _CommsServer.SendMulticastMessage(message, sendCount,
|
|
||||||
_sendOnlyMatchedHost ? device.ToRootDevice().Address : null, cancellationToken);
|
|
||||||
} else {
|
|
||||||
return _CommsServer.SendMulticastMessage(message, sendCount, null, cancellationToken);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisposeRebroadcastTimer()
|
private void DisposeRebroadcastTimer()
|
||||||
|
Loading…
Reference in New Issue
Block a user