Return a Task object and discard it instead of using async void.
This commit is contained in:
parent
361f51ac94
commit
81d5eb4db5
|
@ -114,7 +114,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
|
|
||||||
var taskCompletionSource = new TaskCompletionSource<bool>();
|
var taskCompletionSource = new TaskCompletionSource<bool>();
|
||||||
|
|
||||||
StartStreaming(
|
_ = StartStreaming(
|
||||||
udpClient,
|
udpClient,
|
||||||
hdHomerunManager,
|
hdHomerunManager,
|
||||||
remoteAddress,
|
remoteAddress,
|
||||||
|
@ -135,7 +135,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
await taskCompletionSource.Task.ConfigureAwait(false);
|
await taskCompletionSource.Task.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void StartStreaming(UdpClient udpClient, HdHomerunManager hdHomerunManager, IPAddress remoteAddress, TaskCompletionSource<bool> openTaskCompletionSource, CancellationToken cancellationToken)
|
private async Task StartStreaming(UdpClient udpClient, HdHomerunManager hdHomerunManager, IPAddress remoteAddress, TaskCompletionSource<bool> openTaskCompletionSource, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
using (udpClient)
|
using (udpClient)
|
||||||
using (hdHomerunManager)
|
using (hdHomerunManager)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user