If for some reason you need to keep multiple clients opened, Kotlogram helps you with that.
TelegramClientPool is basically a
Map in which you can put client, with a timeout value.
Once the client timeout, it'll be automatically closed, and you'll have a callback fired.
For convenience, two pools are available
DefaultPool: used for normal clients
DownloadPoolto store client probably created by
getDownloaderClientmethod. The clients you put in this pool will probably have a shorter timeout value.
Updated less than a minute ago