Fixed InitialTranfer after connected

This commit is contained in:
Federico Barresi
2020-01-17 15:29:34 +01:00
parent 6d69eca9e6
commit 412a460261
2 changed files with 7 additions and 5 deletions

View File

@@ -57,9 +57,6 @@ namespace Sharp7.Rx
await s7Connector.InitializeAsync();
RunNotifications(s7Connector, TimeSpan.FromMilliseconds(100))
.AddDisposableTo(Disposables);
#pragma warning disable 4014
Task.Run(async () =>
{
@@ -67,13 +64,16 @@ namespace Sharp7.Rx
{
await s7Connector.Connect();
}
catch (Exception)
catch (Exception e)
{
s7Connector.Logger.LogError(e, "Error while connecting to PLC");
}
});
#pragma warning restore 4014
RunNotifications(s7Connector, TimeSpan.FromMilliseconds(100))
.AddDisposableTo(Disposables);
return true;
}