Commit 1d74fcc8 authored by nanahira's avatar nanahira

fix

parent 075ccc3c
Pipeline #43474 passed with stages
in 2 minutes and 51 seconds
......@@ -55,8 +55,11 @@ export class ClientHandler {
return next();
})
.middleware(YGOProCtosPlayerInfo, async (msg, client, next) => {
if (!client.ip) {
await this.ctx.get(() => IpResolver).setClientIp(client);
if (
!client.ip &&
(await this.ctx.get(() => IpResolver).setClientIp(client))
) {
return;
}
const [name, vpass] = msg.name.split('$');
client.name = name;
......@@ -153,6 +156,10 @@ export class ClientHandler {
}
private async dispatchClientMessage(client: Client, msg: YGOProCtosBase) {
if (client.disconnected) {
// disallow processing any messages after disconnection, including those already in the queue
return;
}
this.logger.debug(
{
msgName: msg.constructor.name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment