Updated GetSession to use lock

pull/85/head
mullerj 2024-06-05 22:17:31 -04:00
parent edbcff7674
commit b9c18c5f75
1 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,4 @@
using System.Runtime.CompilerServices;
using System.Text;
using System.Text;
namespace Mil.Navy.Nrl.Norm
{
@ -75,11 +74,13 @@ namespace Mil.Navy.Nrl.Norm
/// </summary>
/// <param name="handle">Specifies the session to return.</param>
/// <returns>Returns a NormSession.</returns>
[MethodImpl(MethodImplOptions.Synchronized)]
internal static NormSession GetSession(long handle)
{
lock (_normSessions)
{
return _normSessions[handle];
}
}
/// <summary>
/// This function immediately terminates the application's participation in the NormSession and frees any resources used by that session.