mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2026-02-17 14:28:25 +08:00
Use GetAwaiter().GetResult();
This commit is contained in:
@@ -85,7 +85,7 @@ namespace S7.Net
|
||||
{
|
||||
try
|
||||
{
|
||||
ConnectAsync().Wait();
|
||||
OpenAsync().GetAwaiter().GetResult();
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace S7.Net
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenAsync().Wait();
|
||||
OpenAsync().GetAwaiter().GetResult();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user