diff --git a/src/services/webService.ts b/src/services/webService.ts index 5a9251d2..92578c61 100644 --- a/src/services/webService.ts +++ b/src/services/webService.ts @@ -176,7 +176,17 @@ const wsOnConnect = (ws: ws, _req: http.IncomingMessage): void => { } } if (data.logout) { + const accountId = (ws as IWsCustomData).accountId; (ws as IWsCustomData).accountId = undefined; + await Account.updateOne( + { + _id: accountId, + ClientType: "webui" + }, + { + Nonce: 0 + } + ); } }); };