diff --git a/OPCUaClient/OPCUaClient.csproj b/OPCUaClient/OPCUaClient.csproj
index 0a4e3fd..0758d83 100644
--- a/OPCUaClient/OPCUaClient.csproj
+++ b/OPCUaClient/OPCUaClient.csproj
@@ -34,10 +34,10 @@ Add bugs to fix later.
-
-
-
-
+
+
+
+
diff --git a/OPCUaClient/UaClient.cs b/OPCUaClient/UaClient.cs
index f5e5934..de43abd 100644
--- a/OPCUaClient/UaClient.cs
+++ b/OPCUaClient/UaClient.cs
@@ -16,16 +16,16 @@ public class UaClient
private EndpointDescription EndpointDescription;
private EndpointConfiguration EndpointConfig;
private ConfiguredEndpoint Endpoint;
- private Session Session = null;
+ private Session Session;
private UserIdentity UserIdentity;
private ApplicationConfiguration AppConfig;
private int ReconnectPeriod = 10000;
private object Lock = new object();
- private SessionReconnectHandler ReconnectHandler;
+ private SessionReconnectHandler? ReconnectHandler;
#endregion
#region Private methods
- private void KeepAlive(Session session, KeepAliveEventArgs e)
+ private void KeepAlive(ISession session, KeepAliveEventArgs e)
{
try
{
@@ -36,7 +36,7 @@ private void KeepAlive(Session session, KeepAliveEventArgs e)
if (this.ReconnectHandler == null)
{
this.ReconnectHandler = new SessionReconnectHandler(true);
- this.ReconnectHandler.BeginReconnect(this.Session, this.ReconnectPeriod, this.Reconnect);
+ this.ReconnectHandler.BeginReconnect(this.Session, this.ReconnectPeriod, callback: this.Reconnect);
}
}
}
@@ -59,7 +59,7 @@ private void Reconnect(object sender, EventArgs e)
{
if (this.ReconnectHandler.Session != null)
{
- this.Session = this.ReconnectHandler.Session;
+ this.Session = (Session)this.ReconnectHandler.Session;
}
this.ReconnectHandler.Dispose();
this.ReconnectHandler = null;
diff --git a/Test/Test.csproj b/Test/Test.csproj
index 10812bc..06cba6a 100644
--- a/Test/Test.csproj
+++ b/Test/Test.csproj
@@ -14,10 +14,10 @@
-
-
-
-
+
+
+
+