diff --git a/Stack/Opc.Ua.Core/Stack/Tcp/TcpListenerChannel.cs b/Stack/Opc.Ua.Core/Stack/Tcp/TcpListenerChannel.cs index 868f1beb9..75496b084 100644 --- a/Stack/Opc.Ua.Core/Stack/Tcp/TcpListenerChannel.cs +++ b/Stack/Opc.Ua.Core/Stack/Tcp/TcpListenerChannel.cs @@ -144,7 +144,7 @@ public void IdleCleanup() lock (DataLock) { state = State; - if (state == TcpChannelState.Open) + if (state == TcpChannelState.Open || state == TcpChannelState.Connecting) { state = State = TcpChannelState.Closing; } diff --git a/Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryChannel.cs b/Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryChannel.cs index e2dc2a943..8f0dce474 100644 --- a/Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryChannel.cs +++ b/Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryChannel.cs @@ -966,7 +966,7 @@ public void UpdateLastActiveTime() private TcpChannelStateEventHandler m_StateChanged; - private int m_lastActiveTickCount; + private int m_lastActiveTickCount = HiResClock.TickCount; #endregion #region Constants