ensures telegram client is disconnected and the event loop can close

This commit is contained in:
msramalho
2024-04-15 12:29:51 +01:00
parent 874b5ef902
commit 49f657f90c
3 changed files with 3 additions and 2 deletions

2
poetry.lock generated
View File

@@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
[[package]] [[package]]
name = "anyio" name = "anyio"

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "telegram-phone-number-checker" name = "telegram-phone-number-checker"
version = "1.1.0" version = "1.2.0"
description = "Check if phone numbers are connected to Telegram accounts." description = "Check if phone numbers are connected to Telegram accounts."
authors = ["Bellingcat"] authors = ["Bellingcat"]
license = "MIT" license = "MIT"

View File

@@ -245,6 +245,7 @@ async def run_program(
client = await login(api_id, api_hash, api_phone_number) client = await login(api_id, api_hash, api_phone_number)
res = await validate_users(client, phone_numbers) res = await validate_users(client, phone_numbers)
show_results(output, res) show_results(output, res)
client.disconnect()
if __name__ == "__main__": if __name__ == "__main__":