Reputation: 1
I'am doing a pyrogram connection multiple times:
client_pyro = Client(
":memory:",
session_string=session_string,
api_id=app_id,
api_hash=api_hash,
takeout=True,
no_updates=True,
sleep_threshold=5,
proxy=getpyroproxyobject(proxy_index)
)
after this there is connection: enter image description here
then i do:
client_pyro.disconnect()
but the connections dont close, they are still there hanging, so the question is how can i close all those TCP connections via python or pyrogram methods, but in pyrogram i didnt found any options for that neither any description about this case
Upvotes: 0
Views: 304
Reputation: 1
I looked at the documentation and found Client.terminate()
.
If you want the doc url is https://docs.pyrogram.org/api/methods/terminate.
I hope this has helped you.
Upvotes: 0