fix(core): more graceful close
This commit is contained in:
parent
dc3a15261b
commit
d8e36f2233
1 changed files with 1 additions and 1 deletions
|
@ -122,11 +122,11 @@ export class BaseTelegramClient implements ITelegramClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
async close(): Promise<void> {
|
async close(): Promise<void> {
|
||||||
|
this._connected = false
|
||||||
await this.mt.close()
|
await this.mt.close()
|
||||||
this.updates?.stopLoop()
|
this.updates?.stopLoop()
|
||||||
this._prepare.reset()
|
this._prepare.reset()
|
||||||
this._connect.reset()
|
this._connect.reset()
|
||||||
this._connected = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async notifyLoggedIn(auth: tl.auth.TypeAuthorization | tl.RawUser): Promise<tl.RawUser> {
|
async notifyLoggedIn(auth: tl.auth.TypeAuthorization | tl.RawUser): Promise<tl.RawUser> {
|
||||||
|
|
Loading…
Reference in a new issue