Return a Task object and discard it instead of using async void.

This commit is contained in:
Ryan Petris 2020-11-15 19:44:11 -07:00
parent 361f51ac94
commit 81d5eb4db5
No known key found for this signature in database
GPG Key ID: C3D15EFA013E18C2

View File

@ -114,7 +114,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
var taskCompletionSource = new TaskCompletionSource<bool>();
StartStreaming(
_ = StartStreaming(
udpClient,
hdHomerunManager,
remoteAddress,
@ -135,7 +135,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
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 (hdHomerunManager)