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 namespace Mil.Navy.Nrl.Norm
{ {
@ -75,10 +74,12 @@ namespace Mil.Navy.Nrl.Norm
/// </summary> /// </summary>
/// <param name="handle">Specifies the session to return.</param> /// <param name="handle">Specifies the session to return.</param>
/// <returns>Returns a NormSession.</returns> /// <returns>Returns a NormSession.</returns>
[MethodImpl(MethodImplOptions.Synchronized)]
internal static NormSession GetSession(long handle) internal static NormSession GetSession(long handle)
{ {
return _normSessions[handle]; lock (_normSessions)
{
return _normSessions[handle];
}
} }
/// <summary> /// <summary>