diff --git a/Server/PacketHandlers/LoginHandler.cs b/Server/PacketHandlers/LoginHandler.cs index 62a05a8..1681460 100644 --- a/Server/PacketHandlers/LoginHandler.cs +++ b/Server/PacketHandlers/LoginHandler.cs @@ -1,6 +1,7 @@ using System.Security.Cryptography; using System.Text; using Konscious.Security.Cryptography; +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using NetCoreServer; @@ -30,7 +31,7 @@ public class LoginHandler : IPacketHandler { LoginResponseReason loginResponseReason; _logger.LoginData(packet.Username, packet.Password); - var account = _wonderkingContext.Accounts.FirstOrDefault(a => a.Username == packet.Username); + var account = await _wonderkingContext.Accounts.FirstOrDefaultAsync(a => a.Username == packet.Username).ConfigureAwait(false); if (account == null) {