mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-24 11:01:55 +08:00
session close should always return good
This commit is contained in:
@@ -673,11 +673,6 @@ namespace Opc.Ua.Server
|
||||
}
|
||||
catch (ServiceResultException e)
|
||||
{
|
||||
if (e.StatusCode == StatusCodes.BadSessionNotActivated)
|
||||
{
|
||||
return CreateResponse(requestHeader, e);
|
||||
}
|
||||
|
||||
lock (ServerInternal.DiagnosticsWriteLock)
|
||||
{
|
||||
ServerInternal.ServerDiagnostics.RejectedRequestsCount++;
|
||||
|
||||
@@ -404,6 +404,7 @@ namespace Opc.Ua.Server
|
||||
|
||||
// remember activation
|
||||
bool activated = session.Activated;
|
||||
bool validated = session.ValidatedBeforeActivate;
|
||||
|
||||
// close the session.
|
||||
session.Close();
|
||||
@@ -413,11 +414,6 @@ namespace Opc.Ua.Server
|
||||
{
|
||||
m_server.ServerDiagnostics.CurrentSessionCount--;
|
||||
}
|
||||
|
||||
if (!activated)
|
||||
{
|
||||
throw new ServiceResultException(StatusCodes.BadSessionNotActivated);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user