Use GetAwaiter().GetResult();

This commit is contained in:
Serge Camille
2020-09-16 22:31:51 +02:00
parent 4a72c3596b
commit ca89736c7c
2 changed files with 2 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ namespace S7.Net
{
try
{
ConnectAsync().Wait();
OpenAsync().GetAwaiter().GetResult();
return true;
}
catch

View File

@@ -19,7 +19,7 @@ namespace S7.Net
{
try
{
OpenAsync().Wait();
OpenAsync().GetAwaiter().GetResult();
}
catch (Exception exc)
{