Skip to content

Commit

Permalink
improve sessionmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
mregen committed Oct 17, 2024
1 parent 25d77ca commit a9ef7ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Opc.Ua.Server/Server/StandardServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3148,7 +3148,7 @@ protected void ShutDownDelay()
ServerInternal.Status.Variable.ClearChangeMasks(ServerInternal.DefaultSystemContext, true);

// exit if all client connections are closed.
var sessions = ServerInternal.SessionManager.GetSessions().Count;
var sessions = ServerInternal.SessionManager.GetSessionCount();
if (sessions == 0)
{
break;
Expand Down
6 changes: 6 additions & 0 deletions Libraries/Opc.Ua.Server/Session/SessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,12 @@ public event EventHandler<ValidateSessionLessRequestEventArgs> ValidateSessionLe
}
}

/// <inheritdoc/>
public int GetSessionCount()
{
return m_sessions.Count;
}

/// <inheritdoc/>
public IList<Session> GetSessions()
{
Expand Down

0 comments on commit a9ef7ef

Please sign in to comment.