Skip to content

Commit 5446dd7

Browse files
committed
[修复]1. 修复玩家登录流程异常
1 parent 7c13ce4 commit 5446dd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GameFrameX.Hotfix/Logic/Http/Player/ReqLoginHttpHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ public override async Task<MessageObject> Action(string ip, string url, Dictiona
4949
public async Task<LoginState> OnLogin(ReqLogin reqLogin)
5050
{
5151
MetricsAccountHelper.LoginCounterOptions.Inc();
52-
return await GameDb.FindAsync<LoginState>(m => m.UserName == reqLogin.UserName && m.Password == reqLogin.Password);
52+
return await GameDb.FindAsync<LoginState>(m => m.UserName == reqLogin.UserName && m.Password == reqLogin.Password, false);
5353
}
5454

5555
public async Task<LoginState> Register(long accountId, ReqLogin reqLogin)
5656
{
5757
MetricsAccountHelper.RegisterCounterOptions.Inc();
5858
var loginState = new LoginState { Id = accountId, UserName = reqLogin.UserName, Password = reqLogin.Password, };
59-
await GameDb.SaveOneAsync(loginState);
59+
await GameDb.AddOrUpdateAsync(loginState);
6060
return loginState;
6161
}
6262
}

0 commit comments

Comments
 (0)