Browse Source

优化client

wuyi 2 tháng trước cách đây
mục cha
commit
9ca5c67f9d
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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)