diff --git a/Example Projects/dotNetCoreExample/dotNetCoreExample.csproj b/Example Projects/dotNetCoreExample/dotNetCoreExample.csproj
index d15bbbb..a93cbff 100644
--- a/Example Projects/dotNetCoreExample/dotNetCoreExample.csproj
+++ b/Example Projects/dotNetCoreExample/dotNetCoreExample.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.0
+ net6.0
diff --git a/src/SocketLabs/InjectionApi/SocketLabsClient.cs b/src/SocketLabs/InjectionApi/SocketLabsClient.cs
index 562e775..b3cda97 100644
--- a/src/SocketLabs/InjectionApi/SocketLabsClient.cs
+++ b/src/SocketLabs/InjectionApi/SocketLabsClient.cs
@@ -326,11 +326,8 @@ public SendResponse Send(IBasicMessage message)
{
var source = new CancellationTokenSource();
//Read this if you have questions: https://blogs.msdn.microsoft.com/pfxteam/2012/04/13/should-i-expose-synchronous-wrappers-for-asynchronous-methods/
- var sendTask = Task.Run(() => SendAsync(message, source.Token));
-
- while (!sendTask.IsCompleted) { }
- if (sendTask.Status == TaskStatus.Faulted) throw sendTask.Exception;
-
+ var sendTask = Task.Run(() => SendAsync(message, source.Token), source.Token);
+
return sendTask.Result;
}
@@ -381,10 +378,7 @@ public SendResponse Send(IBulkMessage message)
var source = new CancellationTokenSource();
//Read this if you have questions: https://blogs.msdn.microsoft.com/pfxteam/2012/04/13/should-i-expose-synchronous-wrappers-for-asynchronous-methods/
- var sendTask = Task.Run(() => SendAsync(message, source.Token));
-
- while (!sendTask.IsCompleted) { }
- if (sendTask.Status == TaskStatus.Faulted) throw sendTask.Exception;
+ var sendTask = Task.Run(() => SendAsync(message, source.Token), source.Token);
return sendTask.Result;
}
diff --git a/src/SocketLabs/SocketLabs.csproj b/src/SocketLabs/SocketLabs.csproj
index d2e43d1..a5dd9ab 100644
--- a/src/SocketLabs/SocketLabs.csproj
+++ b/src/SocketLabs/SocketLabs.csproj
@@ -1,7 +1,7 @@
- netstandard1.3;netstandard2.0;net45;net5.0
+ netstandard2.0;net48;net5.0;net6.0
anycpu
true
SocketLabs
@@ -9,7 +9,7 @@
false
false
1.2.3
- (C) 2018-2021 SocketLabs
+ (C) 2018-2022 SocketLabs
https://www.socketlabs.com/assets/socketlabs-logo1.png
SocketLabs Development Team
SocketLabs .Net Client Library
@@ -56,8 +56,8 @@
-
-
+
+
diff --git a/test/SocketLabs.Test/SocketLabs.UnitTests.csproj b/test/SocketLabs.Test/SocketLabs.UnitTests.csproj
index 81ee08c..461bffa 100644
--- a/test/SocketLabs.Test/SocketLabs.UnitTests.csproj
+++ b/test/SocketLabs.Test/SocketLabs.UnitTests.csproj
@@ -1,6 +1,6 @@
-
+
Debug
AnyCPU
@@ -9,7 +9,7 @@
Properties
SocketLabs.Test
SocketLabs.Test
- v4.6.1
+ v4.8
512
{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
15.0
@@ -19,6 +19,7 @@
UnitTest
+
true
@@ -43,25 +44,28 @@
- ..\..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll
+ ..\..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll
- ..\..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
+ ..\..\packages\MSTest.TestFramework.2.2.8\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
- ..\..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
+ ..\..\packages\MSTest.TestFramework.2.2.8\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
-
- ..\..\packages\Moq.4.10.0\lib\net45\Moq.dll
+
+ ..\..\packages\Moq.4.16.1\lib\net45\Moq.dll
-
- ..\..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll
+
+ ..\..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
-
- ..\..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll
+
+ ..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
+
+
+ ..\..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
@@ -73,6 +77,7 @@
.editorconfig
+
@@ -88,8 +93,8 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
+
+
-
+
\ No newline at end of file
diff --git a/test/SocketLabs.Test/packages.config b/test/SocketLabs.Test/packages.config
index 095997c..173b49a 100644
--- a/test/SocketLabs.Test/packages.config
+++ b/test/SocketLabs.Test/packages.config
@@ -1,9 +1,10 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file