alik0211 / mtproto-core

Telegram API JS (MTProto) client library for Node.js and browser
https://mtproto-core.js.org
GNU General Public License v3.0
625 stars 111 forks source link

How to correctly destror api instance? #300

Closed zdm closed 3 months ago

zdm commented 4 months ago

Hi, After api instance created - process is not excited, because event loop is not free, I thik api keeos persistent connection to the telegram servers. So, how to correctly desroy the api anf unload it from the memory?

zdm commented 3 months ago

Hey, I found this it sreates persistent socket. Is it possible to add destroy methis to destroy rpc clients and destroy opened sockets?.

fedyk commented 3 months ago

I did attempt to add the destroy method here https://github.com/alik0211/mtproto-core/pull/235/files. Works fine on fork.

zdm commented 3 months ago

yes, thank you i am alo using the path but it is better to have this functionality in the core

zdm commented 3 months ago

Seems that this project is not welll-supported, no sense to keep issues open