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

pull/4182/head
Ryan Petris 4 years ago
parent 361f51ac94
commit 81d5eb4db5
No known key found for this signature in database
GPG Key ID: C3D15EFA013E18C2

@ -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)

Loading…
Cancel
Save