session close should always return good

This commit is contained in:
Martin Regen
2017-05-29 09:55:52 +02:00
parent af0dc88099
commit 66152c19d8
2 changed files with 1 additions and 10 deletions
@@ -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);
}
}
}