aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Net
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2022-01-22 17:06:57 +0100
committerBond_009 <bond.009@outlook.com>2022-01-22 17:06:57 +0100
commit832da133d820a5886904e7ea6480dfa029d6f5e8 (patch)
treee142edf37e89df5e8b27c6358c868e0d598df6d0 /Emby.Server.Implementations/Net
parentcd675475bc5f37d4b20ed71271b17d0945b3f969 (diff)
Always create TaskCompletionSource<T> with TaskCreationOptions.RunContinuationsAsynchronously
Diffstat (limited to 'Emby.Server.Implementations/Net')
-rw-r--r--Emby.Server.Implementations/Net/UdpSocket.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Net/UdpSocket.cs b/Emby.Server.Implementations/Net/UdpSocket.cs
index 0c451ccb6..bbbca4fc0 100644
--- a/Emby.Server.Implementations/Net/UdpSocket.cs
+++ b/Emby.Server.Implementations/Net/UdpSocket.cs
@@ -159,7 +159,7 @@ namespace Emby.Server.Implementations.Net
{
ThrowIfDisposed();
- var taskCompletion = new TaskCompletionSource<SocketReceiveResult>();
+ var taskCompletion = new TaskCompletionSource<SocketReceiveResult>(TaskCreationOptions.RunContinuationsAsynchronously);
bool isResultSet = false;
Action<IAsyncResult> callback = callbackResult =>
@@ -195,7 +195,7 @@ namespace Emby.Server.Implementations.Net
{
ThrowIfDisposed();
- var taskCompletion = new TaskCompletionSource<int>();
+ var taskCompletion = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
bool isResultSet = false;
Action<IAsyncResult> callback = callbackResult =>