Skip to content

Commit c5a99e0

Browse files
committed
[Core] Logout when KickNT
1 parent b2a00c0 commit c5a99e0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lagrange.Core/Internal/Logic/WtExchangeLogic.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public WtExchangeLogic(BotContext context)
5252
_timers[ExchangeEmpTag] = new Timer(OnExchangeEmp);
5353
}
5454

55-
public ValueTask Incoming(ProtocolEvent e)
55+
public async ValueTask Incoming(ProtocolEvent e)
5656
{
5757
switch (e)
5858
{
@@ -62,11 +62,11 @@ public ValueTask Incoming(ProtocolEvent e)
6262
_context.EventInvoker.PostEvent(new BotOfflineEvent(BotOfflineEvent.Reasons.Kicked, (kick.TipsTitle, kick.TipsInfo)));
6363
_context.IsOnline = false;
6464
_timers[SsoHeartBeatTag].Change(Timeout.Infinite, Timeout.Infinite);
65+
66+
await _context.EventContext.SendEvent<SsoUnregisterEventResp>(new SsoUnregisterEventReq());
6567
break;
6668
}
6769
}
68-
69-
return ValueTask.CompletedTask;
7070
}
7171

7272
public async Task<bool> Login(long uin, string? password, CancellationToken token)

0 commit comments

Comments
 (0)