浏览代码

优化client

wuyi 2 月之前
父节点
当前提交
9ca5c67f9d
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/services/tg-msg-send.service.ts

+ 2 - 0
src/services/tg-msg-send.service.ts

@@ -203,6 +203,8 @@ export class TgMsgSendService {
       if (client.connected) {
         await client.disconnect()
         this.app.log.info('TelegramClient 已断开连接')
+        await client.destroy()
+        this.app.log.info('TelegramClient 已销毁')
       }
     } catch (error) {
       const errorMessage = this.extractErrorMessage(error)