fix(core): more graceful close

This commit is contained in:
alina 🌸 2024-06-09 19:05:28 +03:00
parent dc3a15261b
commit d8e36f2233
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -122,11 +122,11 @@ export class BaseTelegramClient implements ITelegramClient {
}
async close(): Promise<void> {
this._connected = false
await this.mt.close()
this.updates?.stopLoop()
this._prepare.reset()
this._connect.reset()
this._connected = false
}
async notifyLoggedIn(auth: tl.auth.TypeAuthorization | tl.RawUser): Promise<tl.RawUser> {