Skip to content

Commit 7c0e806

Browse files
authored
Set initial value of LastActiveTickCount (#2953)
1 parent 55137ba commit 7c0e806

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Stack/Opc.Ua.Core/Stack/Tcp/TcpListenerChannel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public void IdleCleanup()
144144
lock (DataLock)
145145
{
146146
state = State;
147-
if (state == TcpChannelState.Open)
147+
if (state == TcpChannelState.Open || state == TcpChannelState.Connecting)
148148
{
149149
state = State = TcpChannelState.Closing;
150150
}

Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryChannel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ public void UpdateLastActiveTime()
966966

967967
private TcpChannelStateEventHandler m_StateChanged;
968968

969-
private int m_lastActiveTickCount;
969+
private int m_lastActiveTickCount = HiResClock.TickCount;
970970
#endregion
971971

972972
#region Constants

0 commit comments

Comments
 (0)