Skip to content

Commit

Permalink
Merge pull request #389 from Lotendan/bugfix/LoginLocks
Browse files Browse the repository at this point in the history
Fix locking in LoginRequestHandler
  • Loading branch information
NetDwarf authored Jun 12, 2022
2 parents d50d9e4 + e51d3a1 commit ca5fa21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GameServer/packets/Client/168/LoginRequestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class LoginRequestHandler : IPacketHandler
private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

private static DateTime m_lastAccountCreateTime;
private readonly Dictionary<string, LockCount> m_locks = new Dictionary<string, LockCount>();
private static readonly Dictionary<string, LockCount> m_locks = new Dictionary<string, LockCount>();

public void HandlePacket(GameClient client, GSPacketIn packet)
{
Expand Down Expand Up @@ -499,7 +499,7 @@ public static string CryptPassword(string password)
/// Acquires the lock on account.
/// </summary>
/// <param name="accountName">Name of the account.</param>
private void EnterLock(string accountName)
private static void EnterLock(string accountName)
{
// Safety check
if (accountName == null)
Expand Down Expand Up @@ -539,7 +539,7 @@ private void EnterLock(string accountName)
/// Releases the lock on account.
/// </summary>
/// <param name="accountName">Name of the account.</param>
private void ExitLock(string accountName)
private static void ExitLock(string accountName)
{
// Safety check
if (accountName == null)
Expand Down Expand Up @@ -585,4 +585,4 @@ private class LockCount

#endregion
}
}
}

0 comments on commit ca5fa21

Please sign in to comment.